aboutsummaryrefslogtreecommitdiffstats
path: root/tests/query/highlights/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/query/highlights/cpp')
-rw-r--r--tests/query/highlights/cpp/enums-as-constants.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/query/highlights/cpp/enums-as-constants.cpp b/tests/query/highlights/cpp/enums-as-constants.cpp
new file mode 100644
index 000000000..ae773e8d3
--- /dev/null
+++ b/tests/query/highlights/cpp/enums-as-constants.cpp
@@ -0,0 +1,25 @@
+enum class Foo{
+ a,
+// ^ @constant
+ aa,
+// ^ @constant
+ C,
+// ^ @constant
+};
+
+void foo(Foo f){
+ switch ( f ) {
+ case Foo::a:
+ // ^ @type
+ // ^ @namespace
+ // ^ @constant
+ break;
+ case Foo::aa:
+ // ^ @constant
+ break;
+ case Foo::C:
+ // ^ @constant
+ break;
+ default:
+ }
+}