Skip to content

Commit 0073052

Browse files
Update testsymboldatabase.cpp
1 parent b5343cb commit 0073052

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/testsymboldatabase.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5727,6 +5727,24 @@ class TestSymbolDatabase : public TestFixture {
57275727
ASSERT(it->isDefault());
57285728
ASSERT_EQUALS(it->type, Function::Type::eDestructor);
57295729
}
5730+
{
5731+
GET_SYMBOL_DB("struct S {\n" // #13637
5732+
" ~S();\n"
5733+
"};\n"
5734+
"S::~S() = delete;\n");
5735+
ASSERT_EQUALS(db->scopeList.size(), 2);
5736+
auto scope = db->scopeList.begin();
5737+
ASSERT(!scope->functionOf);
5738+
++scope;
5739+
ASSERT_EQUALS(scope->className, "S");
5740+
ASSERT_EQUALS(scope->functionList.size(), 1);
5741+
auto it = scope->functionList.begin();
5742+
ASSERT_EQUALS(it->name(), "S");
5743+
ASSERT_EQUALS(it->tokenDef->linenr(), 2);
5744+
ASSERT(it->isDelete());
5745+
ASSERT(!it->isDefault());
5746+
ASSERT_EQUALS(it->type, Function::Type::eDestructor);
5747+
}
57305748
}
57315749

57325750
void symboldatabase109() { // #13553

0 commit comments

Comments
 (0)