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--) { for (char i = end - 1; i > start; i--) {
tok->insertToken(":"); tok->insertToken(":");
if (i == '\\') { if (i == '\\') {
tok->insertToken(std::string("\'\\") + i + '\''); tok->insertToken(std::string("\'\\") + i + '\'');
} else { } else {
tok->insertToken(std::string(1, '\'') + i + '\''); tok->insertToken(std::string(1, '\'') + i + '\'');
} }
tok->insertToken("case"); 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 '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 '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 '[' ... ']': } }")); ASSERT_EQUALS("void f ( ) { switch ( x ) { case '[' : case '\\\\' : case ']' : ; } }", tokenizeAndStringify("void f() { switch(x) { case '[' ... ']': } }"));
} }