summary refs log tree commit diff stats
path: root/tests/enum/toptions.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/enum/toptions.nim')
-rw-r--r--tests/enum/toptions.nim18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/enum/toptions.nim b/tests/enum/toptions.nim
new file mode 100644
index 000000000..3c841de2c
--- /dev/null
+++ b/tests/enum/toptions.nim
@@ -0,0 +1,18 @@
+

+type

+  # please make sure we have under 32 options (improves code efficiency!)

+  TOption = enum

+    optNone, optForceFullMake, optBoehmGC, optRefcGC, optRangeCheck,

+    optBoundsCheck, optOverflowCheck, optNilCheck, optAssert, optLineDir,

+    optWarns, optHints, optDeadCodeElim, optListCmd, optCompileOnly,

+    optSafeCode,             # only allow safe code

+    optStyleCheck, optOptimizeSpeed, optOptimizeSize, optGenDynLib,

+    optGenGuiApp, optStackTrace

+

+  TOptionset = set[TOption]

+

+var

+  gOptions: TOptionset = {optRefcGC, optRangeCheck, optBoundsCheck,

+    optOverflowCheck, optAssert, optWarns, optHints, optLineDir, optStackTrace}

+  compilerArgs: int

+  gExitcode: int8