Skip to content

Commit dac5019

Browse files
committed
Format test case.
1 parent bed2b88 commit dac5019

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

cpp/autosar/test/rules/M6-5-3/test.cpp

+7-13
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void test_loop_counter_mod_in_side_effect() {
4545
}
4646

4747
void test_loop_counter_reference_mod_in_condition() {
48-
auto loop = [](int& i){
48+
auto loop = [](int &i) {
4949
for (; (i++ < 10); i++) { // NON_COMPLIANT
5050
}
5151
};
@@ -54,7 +54,7 @@ void test_loop_counter_reference_mod_in_condition() {
5454
}
5555

5656
void test_loop_counter_reference_mod() {
57-
auto loop = [](int& i){
57+
auto loop = [](int &i) {
5858
for (; i < 10; i++) { // COMPLIANT
5959
}
6060
};
@@ -63,7 +63,7 @@ void test_loop_counter_reference_mod() {
6363
}
6464

6565
void test_loop_const_reference() {
66-
auto loop = []([[maybe_unused]] int const& i){
66+
auto loop = []([[maybe_unused]] int const &i) {
6767
for (int i = 0; i < 10; i++) { // COMPLIANT
6868
}
6969
};
@@ -72,7 +72,7 @@ void test_loop_const_reference() {
7272
}
7373

7474
void test_loop_counter_reference_mod_in_statement() {
75-
auto loop = [](int& i){
75+
auto loop = [](int &i) {
7676
for (; (i < 10); i++) {
7777
i++; // NON_COMPLIANT
7878
}
@@ -81,17 +81,11 @@ void test_loop_counter_reference_mod_in_statement() {
8181
loop(i);
8282
}
8383

84-
int const_reference(int const& i) {
85-
return i;
86-
}
84+
int const_reference(int const &i) { return i; }
8785

88-
int reference(int& i) {
89-
return i;
90-
}
86+
int reference(int &i) { return i; }
9187

92-
int copy(int i) {
93-
return i;
94-
}
88+
int copy(int i) { return i; }
9589

9690
void test_pass_argument_by() {
9791
for (int i = 0; i < 10; i++) {

0 commit comments

Comments
 (0)