Symbol database: Added TODO test case for #3190
This commit is contained in:
parent
295ba9cc4f
commit
ae7ee5ffd3
|
@ -99,6 +99,7 @@ private:
|
||||||
TEST_CASE(hasInlineClassFunctionReturningFunctionPointer);
|
TEST_CASE(hasInlineClassFunctionReturningFunctionPointer);
|
||||||
TEST_CASE(hasMissingInlineClassFunctionReturningFunctionPointer);
|
TEST_CASE(hasMissingInlineClassFunctionReturningFunctionPointer);
|
||||||
TEST_CASE(hasClassFunctionReturningFunctionPointer);
|
TEST_CASE(hasClassFunctionReturningFunctionPointer);
|
||||||
|
TEST_CASE(hasSubClassConstructor);
|
||||||
TEST_CASE(functionDeclarationTemplate);
|
TEST_CASE(functionDeclarationTemplate);
|
||||||
TEST_CASE(functionDeclarations);
|
TEST_CASE(functionDeclarations);
|
||||||
|
|
||||||
|
@ -657,6 +658,24 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void hasSubClassConstructor() {
|
||||||
|
GET_SYMBOL_DB("class Foo { class Sub; }; class Foo::Sub { Sub() {} };");
|
||||||
|
ASSERT(db);
|
||||||
|
|
||||||
|
if (db) {
|
||||||
|
bool seen_something = false;
|
||||||
|
for (std::list<Scope>::const_iterator scope = db->scopeList.begin(); scope != db->scopeList.end(); ++scope) {
|
||||||
|
for (std::list<Function>::const_iterator func = scope->functionList.begin(); func != scope->functionList.end(); ++func) {
|
||||||
|
ASSERT_EQUALS("Sub", func->token->str());
|
||||||
|
ASSERT_EQUALS(true, func->hasBody);
|
||||||
|
ASSERT_EQUALS(Function::eConstructor, func->type);
|
||||||
|
seen_something = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
TODO_ASSERT_EQUALS("works", "doesn't work", seen_something ? "works" : "doesn't work");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void functionDeclarationTemplate() {
|
void functionDeclarationTemplate() {
|
||||||
GET_SYMBOL_DB("std::map<int, string> foo() {}")
|
GET_SYMBOL_DB("std::map<int, string> foo() {}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue