Skip to content

Commit

Permalink
Format test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
fjatWbyT committed Nov 17, 2024
1 parent bed2b88 commit dac5019
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions cpp/autosar/test/rules/M6-5-3/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void test_loop_counter_mod_in_side_effect() {
}

void test_loop_counter_reference_mod_in_condition() {
auto loop = [](int& i){
auto loop = [](int &i) {
for (; (i++ < 10); i++) { // NON_COMPLIANT
}
};
Expand All @@ -54,7 +54,7 @@ void test_loop_counter_reference_mod_in_condition() {
}

void test_loop_counter_reference_mod() {
auto loop = [](int& i){
auto loop = [](int &i) {
for (; i < 10; i++) { // COMPLIANT
}
};
Expand All @@ -63,7 +63,7 @@ void test_loop_counter_reference_mod() {
}

void test_loop_const_reference() {
auto loop = []([[maybe_unused]] int const& i){
auto loop = []([[maybe_unused]] int const &i) {
for (int i = 0; i < 10; i++) { // COMPLIANT
}
};
Expand All @@ -72,7 +72,7 @@ void test_loop_const_reference() {
}

void test_loop_counter_reference_mod_in_statement() {
auto loop = [](int& i){
auto loop = [](int &i) {
for (; (i < 10); i++) {
i++; // NON_COMPLIANT
}
Expand All @@ -81,17 +81,11 @@ void test_loop_counter_reference_mod_in_statement() {
loop(i);
}

int const_reference(int const& i) {
return i;
}
int const_reference(int const &i) { return i; }

int reference(int& i) {
return i;
}
int reference(int &i) { return i; }

int copy(int i) {
return i;
}
int copy(int i) { return i; }

void test_pass_argument_by() {
for (int i = 0; i < 10; i++) {
Expand Down

0 comments on commit dac5019

Please sign in to comment.