Skip to content

Commit dfc00f8

Browse files
committed
add test
1 parent 8c14fc7 commit dfc00f8

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
@@ -440,6 +440,7 @@ class TestTokenizer : public TestFixture {
440440
TEST_CASE(astfuncdecl);
441441
TEST_CASE(astarrayinit);
442442
TEST_CASE(astbracedinit);
443+
TEST_CASE(astarrayofptrs);
443444

444445
TEST_CASE(startOfExecutableScope);
445446

@@ -7543,6 +7544,11 @@ class TestTokenizer : public TestFixture {
75437544
ASSERT_EQUALS("anullptr{", testAst("int *a { nullptr };", AstStyle::Simple, ListSimplification::Full));
75447545
}
75457546

7547+
void astarrayofptrs() {
7548+
ASSERT_EQUALS("a1[", testAst("int *a[1];", AstStyle::Simple, ListSimplification::Full));
7549+
ASSERT_EQUALS("a1[", testAst("int **a[1];", AstStyle::Simple, ListSimplification::Full));
7550+
}
7551+
75467552
#define isStartOfExecutableScope(offset, code) isStartOfExecutableScope_(offset, code, __FILE__, __LINE__)
75477553
template<size_t size>
75487554
bool isStartOfExecutableScope_(int offset, const char (&code)[size], const char* file, int line) {

0 commit comments

Comments
 (0)