summary refs log tree commit diff stats
path: root/tests/cpp/tenum_set.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cpp/tenum_set.nim')
-rw-r--r--tests/cpp/tenum_set.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/cpp/tenum_set.nim b/tests/cpp/tenum_set.nim
new file mode 100644
index 000000000..6afed722f
--- /dev/null
+++ b/tests/cpp/tenum_set.nim
@@ -0,0 +1,9 @@
+discard """
+targets: "cpp"
+output: "{A, B, C}"
+"""
+
+type Enum {.importcpp: "namespaced::Enum", header: "enum.hpp".} = enum A, B, C
+
+var vals = {low(Enum) .. high(Enum)}
+echo vals