summary refs log tree commit diff stats
path: root/tests/casestmt/tcomputedgoto.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/casestmt/tcomputedgoto.nim')
-rw-r--r--tests/casestmt/tcomputedgoto.nim17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/casestmt/tcomputedgoto.nim b/tests/casestmt/tcomputedgoto.nim
index f567174af..f7603dac3 100644
--- a/tests/casestmt/tcomputedgoto.nim
+++ b/tests/casestmt/tcomputedgoto.nim
@@ -1,16 +1,24 @@
 discard """
-  output: '''yeah A enumB
+  output: '''
+yeah A enumB
+uneven
 yeah A enumB
 yeah CD enumD
+uneven
 yeah CD enumE
 yeah A enumB
+uneven
 yeah CD enumE
 yeah CD enumD
+uneven
 yeah A enumB
 yeah B enumC
+uneven
+yeah A enumB
 yeah A enumB
+uneven
 yeah A enumB
-yeah A enumB'''
+'''
 """
 
 type
@@ -18,7 +26,7 @@ type
     enumA, enumB, enumC, enumD, enumE, enumLast
 
 proc vm() =
-  var instructions: array [0..100, MyEnum]
+  var instructions: array[0..100, MyEnum]
   instructions[2] = enumC
   instructions[3] = enumD
   instructions[4] = enumA
@@ -45,4 +53,7 @@ proc vm() =
     of enumLast: discard
     inc(pc)
 
+    if pc mod 2 == 1:
+      echo "uneven"
+
 vm()