astyle formatting

[ci skip]
This commit is contained in:
Daniel Marjamäki 2019-07-15 09:29:47 +02:00
parent 68e6a440ff
commit af051a3787
2 changed files with 3 additions and 3 deletions

View File

@ -2822,9 +2822,9 @@ void Tokenizer::simplifyCaseRange()
for (char i = end - 1; i > start; i--) {
tok->insertToken(":");
if (i == '\\') {
tok->insertToken(std::string("\'\\") + i + '\'');
tok->insertToken(std::string("\'\\") + i + '\'');
} else {
tok->insertToken(std::string(1, '\'') + i + '\'');
tok->insertToken(std::string(1, '\'') + i + '\'');
}
tok->insertToken("case");
}

View File

@ -7114,7 +7114,7 @@ private:
ASSERT_EQUALS("void f ( ) { switch ( x ) { case 'a' : case 'b' : case 'c' : ; } }", tokenizeAndStringify("void f() { switch(x) { case 'a' ... 'c': } }"));
ASSERT_EQUALS("void f ( ) { switch ( x ) { case 'c' . . . 'a' : ; } }", tokenizeAndStringify("void f() { switch(x) { case 'c' ... 'a': } }"));
ASSERT_EQUALS("void f ( ) { switch ( x ) { case '[' : case '\\\\' : case ']' : ; } }", tokenizeAndStringify("void f() { switch(x) { case '[' ... ']': } }"));
}