Skip to content

Commit 2d45605

Browse files
committed
Add another test
1 parent 4e005c4 commit 2d45605

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/testsimplifytokens.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class TestSimplifyTokens : public TestFixture {
4242
void run() override {
4343
TEST_CASE(combine_strings);
4444
TEST_CASE(combine_wstrings);
45+
TEST_CASE(combine_wstrings_Windows);
4546
TEST_CASE(combine_ustrings);
4647
TEST_CASE(combine_Ustrings);
4748
TEST_CASE(combine_u8strings);
@@ -270,6 +271,14 @@ class TestSimplifyTokens : public TestFixture {
270271
ASSERT_EQUALS(expected, tokenizer.tokens()->stringifyList(nullptr, false));
271272
}
272273

274+
void combine_wstrings_Windows() {
275+
const char code[] = "const auto* f() {\n"
276+
" return _T(\"abc\") _T(\"def\") _T(\"ghi\");\n"
277+
"}";
278+
279+
ASSERT_EQUALS("const auto * f ( ) { return L\"abcdefghi\" ; }", tok(code, /*simplify*/ true, cppcheck::Platform::Type::Native));
280+
}
281+
273282
void combine_ustrings() {
274283
const char code[] = "abcd = u\"ab\" u\"cd\";";
275284

0 commit comments

Comments
 (0)