forked from qt-creator/qt-creator
CppTools: Tests: Introduce basic BuiltinSymbolSearcher tests
Change-Id: I25f11e80747863f797d146980d8ee0e605acb6e5 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
// 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
|
||||
Reference in New Issue
Block a user