Skip to content

Commit c6d26d3

Browse files
committed
A2-10-5: Format test files
1 parent 2b55908 commit c6d26d3

File tree

3 files changed

+13
-25
lines changed

3 files changed

+13
-25
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
| test1a.cpp:6:12:6:13 | g3 | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1a.cpp:6:12:6:13 | g3 | g3 | test1b.cpp:7:12:7:13 | g3 | g3 |
2-
| test1a.cpp:21:42:21:42 | number_two | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1a.cpp:21:42:21:42 | number_two | number_two | test1b.cpp:12:42:12:42 | number_two | number_two |
2+
| test1a.cpp:17:43:17:43 | number_two | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1a.cpp:17:43:17:43 | number_two | number_two | test1b.cpp:12:43:12:43 | number_two | number_two |
33
| test1b.cpp:7:12:7:13 | g3 | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1b.cpp:7:12:7:13 | g3 | g3 | test1a.cpp:6:12:6:13 | g3 | g3 |
4-
| test1b.cpp:12:42:12:42 | number_two | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1b.cpp:12:42:12:42 | number_two | number_two | test1a.cpp:21:42:21:42 | number_two | number_two |
4+
| test1b.cpp:12:43:12:43 | number_two | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1b.cpp:12:43:12:43 | number_two | number_two | test1a.cpp:17:43:17:43 | number_two | number_two |

cpp/autosar/test/rules/A2-10-5/test1a.cpp

+8-16
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,16 @@ static int g2; // COMPLIANT
66
static int g3 = 1; // NON_COMPLIANT
77
static void f1(){}; // NON_COMPLIANT
88

9-
// Variable template has multiple declarations: one for the uninstantiated template and one for each
10-
// instantiation
11-
template<class T> constexpr T number_one = T(1); // COMPLIANT
9+
// Variable template has multiple declarations: one for the uninstantiated
10+
// template and one for each instantiation
11+
template <class T> constexpr T number_one = T(1); // COMPLIANT
1212

13-
int test() {
14-
return number_one<int>;
15-
}
13+
int test() { return number_one<int>; }
1614

17-
long test2() {
18-
return number_one<long>;
19-
}
15+
long test2() { return number_one<long>; }
2016

21-
template<class T> constexpr T number_two = T(1); // NON_COMPLIANT
17+
template <class T> constexpr T number_two = T(1); // NON_COMPLIANT
2218

23-
int test3() {
24-
return number_two<int>;
25-
}
19+
int test3() { return number_two<int>; }
2620

27-
long test4() {
28-
return number_two<long>;
29-
}
21+
long test4() { return number_two<long>; }

cpp/autosar/test/rules/A2-10-5/test1b.cpp

+3-7
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@ static int g3 = 0; // NON_COMPLIANT
99

1010
static void f1() {} // NON_COMPLIANT
1111

12-
template<class T> constexpr T number_two = T(1); // NON_COMPLIANT
12+
template <class T> constexpr T number_two = T(1); // NON_COMPLIANT
1313

14-
int test3() {
15-
return number_two<int>;
16-
}
14+
int test3() { return number_two<int>; }
1715

18-
long test4() {
19-
return number_two<long>;
20-
}
16+
long test4() { return number_two<long>; }

0 commit comments

Comments
 (0)