aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cppsymbolsearcher/testdata_basic/file1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cppsymbolsearcher/testdata_basic/file1.cpp')
-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