Skip to content

Commit

Permalink
Update testsymboldatabase.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Aug 21, 2024
1 parent c1ab08a commit 1ecb737
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/testsymboldatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ class TestSymbolDatabase : public TestFixture {
TEST_CASE(createSymbolDatabaseFindAllScopes6);
TEST_CASE(createSymbolDatabaseFindAllScopes7);
TEST_CASE(createSymbolDatabaseFindAllScopes8); // #12761
TEST_CASE(createSymbolDatabaseFindAllScopes9);

TEST_CASE(createSymbolDatabaseIncompleteVars);

Expand Down Expand Up @@ -5849,6 +5850,15 @@ class TestSymbolDatabase : public TestFixture {
ASSERT(myst1->scope() != myst2->scope());
}

void createSymbolDatabaseFindAllScopes9() // #12943
{
GET_SYMBOL_DB("void f(int n) {\n"
" if ([](int i) { return i == 2; }(n)) {}\n"
"}\n");
ASSERT(db && db->scopeList.size() == 4);
ASSERT_EQUALS(db->scopeList.back().type, Scope::eLambda);
}

void createSymbolDatabaseIncompleteVars()
{
{
Expand Down

0 comments on commit 1ecb737

Please sign in to comment.