Commit dcf61846 authored by Nikolai Kosjar's avatar Nikolai Kosjar

CppTools: Tests: Add basic tests for locator filters

Change-Id: Ie71aa8a39f4584a024a4f104841ad8e57947e489
Reviewed-by: default avatarDavid Schulz <david.schulz@digia.com>
parent a9e737b0
This diff is collapsed.
......@@ -102,7 +102,8 @@ equals(TEST, 1) {
cppcompletion_test.cpp \
cppmodelmanager_test.cpp \
modelmanagertesthelper.cpp \
cpppointerdeclarationformatter_test.cpp
cpppointerdeclarationformatter_test.cpp \
cpplocatorfilter_test.cpp
HEADERS += \
cpppreprocessertesthelper.h \
......
......@@ -119,7 +119,8 @@ QtcPlugin {
"cpppreprocessertesthelper.cpp", "cpppreprocessertesthelper.h",
"cppmodelmanager_test.cpp",
"modelmanagertesthelper.cpp", "modelmanagertesthelper.h",
"cpppointerdeclarationformatter_test.cpp"
"cpppointerdeclarationformatter_test.cpp",
"cpplocatorfilter_test.cpp"
]
cpp.defines: outer.concat(['SRCDIR="' + FileInfo.path(filePath) + '"'])
......
......@@ -200,6 +200,10 @@ private slots:
void test_modelmanager_gc_if_last_cppeditor_closed();
void test_modelmanager_dont_gc_opened_files();
void test_cpplocatorfilters_CppLocatorFilter();
void test_cpplocatorfilters_CppLocatorFilter_data();
void test_cpplocatorfilters_CppCurrentDocumentFilter();
private:
void test_completion();
#endif
......
// Copyright header
//
// Symbols in a global namespace
//
int myVariable;
int myFunction(bool yesno, int number) {}
enum MyEnum { V1, V2 };
class MyClass
{
public:
MyClass() {}
int function1();
int function2(bool yesno, int number) {}
};
//
// Symbols in a named namespace
//
namespace MyNamespace {
int myVariable;
int myFunction(bool yesno, int number) {}
enum MyEnum { V1, V2 };
class MyClass
{
public:
MyClass() {}
int function1();
int function2(bool yesno, int number) {}
};
} // namespace MyNamespace
//
// Symbols in an anonymous namespace
//
namespace {
int myVariable;
int myFunction(bool yesno, int number) {}
enum MyEnum { V1, V2 };
class MyClass
{
public:
MyClass() {}
int function1();
int function2(bool yesno, int number) {}
};
} // anonymous namespace
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment