mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-24 09:12:28 +02:00
CppParser: fix for std::function<void()> parameter
The parameter was previously seen as a function because of it's brackets.
This commit is contained in:
@@ -77,6 +77,22 @@ void CppParserTest::testExtractName()
|
||||
decl = "void func(int arg1, int arg2)";
|
||||
name = Symbol::extractName(decl);
|
||||
assertTrue (name == "func");
|
||||
|
||||
decl = "std::function<bool> func";
|
||||
name = Symbol::extractName(decl);
|
||||
assertTrue (name == "func");
|
||||
|
||||
decl = "std::function<void(bool)> func";
|
||||
name = Symbol::extractName(decl);
|
||||
assertTrue (name == "func");
|
||||
|
||||
decl = "std::function<std::vector<int>(std::vector<bool>)> func";
|
||||
name = Symbol::extractName(decl);
|
||||
assertTrue (name == "func");
|
||||
|
||||
decl = "std::function<void*(std::function<const int*(void)>)> func";
|
||||
name = Symbol::extractName(decl);
|
||||
assertTrue (name == "func");
|
||||
|
||||
decl = "const std::vector<NS::MyType>* var";
|
||||
name = Symbol::extractName(decl);
|
||||
|
||||
Reference in New Issue
Block a user