aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cppsymbolsearcher
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@digia.com>2013-08-16 16:37:16 +0200
committerNikolai Kosjar <nikolai.kosjar@digia.com>2013-08-20 14:18:45 +0200
commitd185849150aeacc45accd6b0ae1525d700cfd689 (patch)
tree5f688daa67e28443e16babc3b7376ff3b4455799 /tests/cppsymbolsearcher
parent3256b7b2ef7073264af3197bdcd62f4f9fe92ea1 (diff)
CppTools: Tests: Introduce basic BuiltinSymbolSearcher tests
Change-Id: I25f11e80747863f797d146980d8ee0e605acb6e5 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'tests/cppsymbolsearcher')
-rw-r--r--tests/cppsymbolsearcher/testdata_basic/file1.cpp63
1 files changed, 63 insertions, 0 deletions
diff --git a/tests/cppsymbolsearcher/testdata_basic/file1.cpp b/tests/cppsymbolsearcher/testdata_basic/file1.cpp
new file mode 100644
index 0000000000..75c772cfb2
--- /dev/null
+++ b/tests/cppsymbolsearcher/testdata_basic/file1.cpp
@@ -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