From af051a37879b1065b2fdf865c3eb5cffd7e7c77c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 15 Jul 2019 09:29:47 +0200 Subject: [PATCH] astyle formatting [ci skip] --- lib/tokenize.cpp | 4 ++-- test/testtokenize.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index eaf7b8add..3b401fa29 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -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"); } diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index 209094064..9989df8bb 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -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 '[' ... ']': } }")); }