Skip to content

Commit 3e0e2b3

Browse files
Update testtokenize.cpp
1 parent 4bfbb5a commit 3e0e2b3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

test/testtokenize.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ class TestTokenizer : public TestFixture {
295295
TEST_CASE(simplifyInitVar2);
296296
TEST_CASE(simplifyInitVar3);
297297
TEST_CASE(simplifyInitVar4);
298+
TEST_CASE(simplifyInitVar5);
298299

299300
TEST_CASE(bitfields1);
300301
TEST_CASE(bitfields2);
@@ -4678,6 +4679,11 @@ class TestTokenizer : public TestFixture {
46784679
"}", tokenizeAndStringify(code));
46794680
}
46804681

4682+
void simplifyInitVar5() { // #14218
4683+
const char code[] = "int c[1]{}, b;";
4684+
ASSERT_EQUALS("int c [ 1 ] { } ; int b ;", tokenizeAndStringify(code));
4685+
}
4686+
46814687
void bitfields1() {
46824688
const char code1[] = "struct A { bool x : 1; };";
46834689
ASSERT_EQUALS("struct A { bool x ; } ;", tokenizeAndStringify(code1));

0 commit comments

Comments
 (0)