Skip to content

Commit f8dd6ee

Browse files
committed
Fix test code so it compiles.
1 parent 97fa9e9 commit f8dd6ee

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/testsymboldatabase.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4567,13 +4567,13 @@ class TestSymbolDatabase: public TestFixture {
45674567
}
45684568

45694569
void auto3() {
4570-
GET_SYMBOL_DB("enum class E : unsigned short { A, B, C };\n"
4570+
GET_SYMBOL_DB("enum E : unsigned short { A, B, C };\n"
45714571
"int foo() {\n"
45724572
" auto a = new E;\n"
45734573
" auto * b = new E;\n"
45744574
" auto c = new E[10];\n"
45754575
" auto * d = new E[10];\n"
4576-
" return a + b + c + d;\n"
4576+
" return *a + *b + c[0] + d[0];\n"
45774577
"}");
45784578
const Token *autotok = Token::findsimplematch(tokenizer.tokens(), "auto");
45794579
ASSERT(db && autotok && autotok->valueType() && autotok->valueType()->pointer == 1 && autotok->valueType()->typeScope && autotok->valueType()->typeScope->definedType && autotok->valueType()->typeScope->definedType->name() == "E" && autotok->type() == nullptr);

0 commit comments

Comments
 (0)