Skip to content

Commit

Permalink
Update testsymboldatabase.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github authored Feb 14, 2025
1 parent b5343cb commit 0073052
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/testsymboldatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5727,6 +5727,24 @@ class TestSymbolDatabase : public TestFixture {
ASSERT(it->isDefault());
ASSERT_EQUALS(it->type, Function::Type::eDestructor);
}
{
GET_SYMBOL_DB("struct S {\n" // #13637
" ~S();\n"
"};\n"
"S::~S() = delete;\n");
ASSERT_EQUALS(db->scopeList.size(), 2);
auto scope = db->scopeList.begin();
ASSERT(!scope->functionOf);
++scope;
ASSERT_EQUALS(scope->className, "S");
ASSERT_EQUALS(scope->functionList.size(), 1);
auto it = scope->functionList.begin();
ASSERT_EQUALS(it->name(), "S");
ASSERT_EQUALS(it->tokenDef->linenr(), 2);
ASSERT(it->isDelete());
ASSERT(!it->isDefault());
ASSERT_EQUALS(it->type, Function::Type::eDestructor);
}
}

void symboldatabase109() { // #13553
Expand Down

0 comments on commit 0073052

Please sign in to comment.