Skip to content

Commit bce38a0

Browse files
committed
Reformat test cases of 9-4-2 and 9-5-2
1 parent 1355eff commit bce38a0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cpp/misra/test/rules/RULE-9-4-2/test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ void testOtherLabelsInBranch(int expr) {
8888
void testLeadingNonCaseStatement(int expr) {
8989
switch (expr) { // NON_COMPLIANT: Non-case statement is the first statement in
9090
// the switch body
91-
int x = 1;
91+
int x = 1;
9292
case 1:
9393
i++;
9494
break;

cpp/misra/test/rules/RULE-9-5-2/test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ int main() {
5353
for (auto x : std::vector<int>(3)) { // COMPLIANT: 1 constructor call only
5454
}
5555

56-
for (auto x :
57-
std::vector<int>{1, 2, 3}) { // NON_COMPLIANT: 2 constructor call to
58-
// `vector` and `initializer_list`, respectively
56+
for (auto x : std::vector<int>{
57+
1, 2, 3}) { // NON_COMPLIANT: 2 constructor call to
58+
// `vector` and `initializer_list`, respectively
5959
}
6060

6161
for (auto x : MyContainer()) { // COMPLIANT: 1 constructor call only

0 commit comments

Comments
 (0)