summary refs log tree commit diff stats
path: root/tests/controlflow
diff options
context:
space:
mode:
Diffstat (limited to 'tests/controlflow')
-rw-r--r--tests/controlflow/tblock1.nim22
-rw-r--r--tests/controlflow/tcontinue.nim4
-rw-r--r--tests/controlflow/tnestif.nim36
-rw-r--r--tests/controlflow/tstatret.nim10
4 files changed, 36 insertions, 36 deletions
diff --git a/tests/controlflow/tblock1.nim b/tests/controlflow/tblock1.nim
index 5c41aaf82..e3a780dfe 100644
--- a/tests/controlflow/tblock1.nim
+++ b/tests/controlflow/tblock1.nim
@@ -3,16 +3,16 @@ discard """
   line: 14
   errormsg: "undeclared identifier: \'ha\'"
 """
-# check for forward label and

-# for failure when label is not declared

-

-proc main =

-  block endLess:

-    write(stdout, "Muaahh!\N")

-    break endLess

-

-  break ha #ERROR

-

-main()

+# check for forward label and
+# for failure when label is not declared
+
+proc main =
+  block endLess:
+    write(stdout, "Muaahh!\N")
+    break endLess
+
+  break ha #ERROR
+
+main()
 
 
diff --git a/tests/controlflow/tcontinue.nim b/tests/controlflow/tcontinue.nim
index 092026e8c..ac4fdc2de 100644
--- a/tests/controlflow/tcontinue.nim
+++ b/tests/controlflow/tcontinue.nim
@@ -6,7 +6,7 @@ var i = 0
 while i < 400:
 
   if i == 10: break
-  elif i == 3: 
+  elif i == 3:
     inc i
     continue
   inc i
@@ -16,7 +16,7 @@ var j = 0
 while j < 300:
   for x in 0..34:
     if j < 300: continue
-    if x == 10: 
+    if x == 10:
       echo "failure: should never happen"
       break
   f = "came here"
diff --git a/tests/controlflow/tnestif.nim b/tests/controlflow/tnestif.nim
index bfcd8751c..3d8adb337 100644
--- a/tests/controlflow/tnestif.nim
+++ b/tests/controlflow/tnestif.nim
@@ -2,23 +2,23 @@ discard """
   file: "tnestif.nim"
   output: "i == 2"
 """
-# test nested ifs

-

-var

-    x, y: int

-x = 2

-if x == 0:

-    write(stdout, "i == 0")

-    if y == 0:

-        write(stdout, x)

-    else:

-        write(stdout, y)

-elif x == 1:

-    write(stdout, "i == 1")

-elif x == 2:

-    write(stdout, "i == 2")

-else:

-    write(stdout, "looks like Python")

-#OUT i == 2

+# test nested ifs
+
+var
+    x, y: int
+x = 2
+if x == 0:
+    write(stdout, "i == 0")
+    if y == 0:
+        write(stdout, x)
+    else:
+        write(stdout, y)
+elif x == 1:
+    write(stdout, "i == 1")
+elif x == 2:
+    write(stdout, "i == 2")
+else:
+    write(stdout, "looks like Python")
+#OUT i == 2
 
 
diff --git a/tests/controlflow/tstatret.nim b/tests/controlflow/tstatret.nim
index bf90255a0..d655f5595 100644
--- a/tests/controlflow/tstatret.nim
+++ b/tests/controlflow/tstatret.nim
@@ -3,10 +3,10 @@ discard """
   line: 9
   errormsg: "statement not allowed after"
 """
-# no statement after return

-proc main() =

-  return

-  echo("huch?") #ERROR_MSG statement not allowed after

-

+# no statement after return
+proc main() =
+  return
+  echo("huch?") #ERROR_MSG statement not allowed after
+