summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-09-30 21:35:30 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-09-30 21:35:30 +0200
commitddc131cf07972decc206e033b2dd85a42eb1c98d (patch)
tree91cdafb802ebef32fd1f4d8b8347409165dee463 /tests
parentb2c358be96e496c37f4d02b0e886a06ed503af9e (diff)
downloadNim-ddc131cf07972decc206e033b2dd85a42eb1c98d.tar.gz
the parser finally parses 'echo {1,2}' as it should
Diffstat (limited to 'tests')
-rw-r--r--tests/casestmt/tcomputedgoto.nim2
-rw-r--r--tests/constr/tconstr1.nim4
-rw-r--r--tests/constr/tconstr2.nim2
-rw-r--r--tests/macros/tdebugstmt.nim2
-rw-r--r--tests/magics/tlowhigh.nim2
-rw-r--r--tests/misc/mvarious.nim2
-rw-r--r--tests/misc/tnew.nim2
-rw-r--r--tests/misc/tradix.nim10
-rw-r--r--tests/misc/tstrdesc.nim4
-rw-r--r--tests/misc/tvarnums.nim2
-rw-r--r--tests/stdlib/tmath2.nim2
-rw-r--r--tests/stdlib/trepr2.nim2
-rw-r--r--tests/stdlib/tstrset.nim6
-rw-r--r--tests/threads/tthreadanalysis.nim2
-rw-r--r--tests/threads/tthreadanalysis2.nim2
-rw-r--r--tests/varres/tvarres3.nim2
-rw-r--r--tests/vm/tarrayboundeval.nim2
17 files changed, 25 insertions, 25 deletions
diff --git a/tests/casestmt/tcomputedgoto.nim b/tests/casestmt/tcomputedgoto.nim
index f567174af..149072964 100644
--- a/tests/casestmt/tcomputedgoto.nim
+++ b/tests/casestmt/tcomputedgoto.nim
@@ -18,7 +18,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
diff --git a/tests/constr/tconstr1.nim b/tests/constr/tconstr1.nim
index 28431287c..b9cf5d00b 100644
--- a/tests/constr/tconstr1.nim
+++ b/tests/constr/tconstr1.nim
@@ -14,13 +14,13 @@ type
 
 proc testSem =
   var
-    things: array [0..1, TComplexRecord] = [
+    things: array[0..1, TComplexRecord] = [
       (s: "hi", x: 69, y: 45, z: 0.0, chars: {'a', 'b', 'c'}),
       (s: "hi", x: 69, y: 45, z: 1.0, chars: {'a', 'b', 'c'})]
   write(stdout, things[0].x)
 
 const
-  things: array [0..1, TComplexRecord] = [
+  things: array[0..1, TComplexRecord] = [
     (s: "hi", x: 69, y: 45, z: 0.0, chars: {'a', 'b', 'c'}),
     (s: "hi", x: 69, y: 45, z: 1.0)] #ERROR
   otherThings = [  # the same
diff --git a/tests/constr/tconstr2.nim b/tests/constr/tconstr2.nim
index cd00681b8..b16be6c50 100644
--- a/tests/constr/tconstr2.nim
+++ b/tests/constr/tconstr2.nim
@@ -12,7 +12,7 @@ type
     chars: set[char]]
 
 const
-  things: array [0..1, TComplexRecord] = [
+  things: array[0..1, TComplexRecord] = [
     (s: "hi", x: 69, y: 45, z: 0.0, chars: {'a', 'b', 'c'}),
     (s: "hi", x: 69, y: 45, z: 1.0, chars: {})]
   otherThings = [  # the same
diff --git a/tests/macros/tdebugstmt.nim b/tests/macros/tdebugstmt.nim
index 740ae7b05..69e610075 100644
--- a/tests/macros/tdebugstmt.nim
+++ b/tests/macros/tdebugstmt.nim
@@ -21,7 +21,7 @@ macro debug(n: varargs[untyped]): untyped =
     add(result, newCall("writeLine", newIdentNode("stdout"), n[i]))
 
 var
-  a: array [0..10, int]
+  a: array[0..10, int]
   x = "some string"
 a[0] = 42
 a[1] = 45
diff --git a/tests/magics/tlowhigh.nim b/tests/magics/tlowhigh.nim
index 4998b73dc..60ed13c99 100644
--- a/tests/magics/tlowhigh.nim
+++ b/tests/magics/tlowhigh.nim
@@ -8,7 +8,7 @@ type
   myEnum = enum e1, e2, e3, e4, e5
 
 var
-  a: array [myEnum, int]
+  a: array[myEnum, int]
 
 for i in low(a) .. high(a):
   a[i] = 0
diff --git a/tests/misc/mvarious.nim b/tests/misc/mvarious.nim
index d1587faec..8efe7c92f 100644
--- a/tests/misc/mvarious.nim
+++ b/tests/misc/mvarious.nim
@@ -1,6 +1,6 @@
 # Test a submodule
 
 #type
-#  TStringArr = array [0.. *] of string
+#  TStringArr = array[0.. *] of string
 
 proc exportme* = discard
diff --git a/tests/misc/tnew.nim b/tests/misc/tnew.nim
index 88e8bd02c..89f34a621 100644
--- a/tests/misc/tnew.nim
+++ b/tests/misc/tnew.nim
@@ -9,7 +9,7 @@ type
     str: string
     le, ri: PNode
 
-  TStressTest = ref array [0..45, array [1..45, TNode]]
+  TStressTest = ref array[0..45, array[1..45, TNode]]
 
 proc finalizer(n: PNode) =
   write(stdout, n.data)
diff --git a/tests/misc/tradix.nim b/tests/misc/tradix.nim
index 36a4f39f6..07674af18 100644
--- a/tests/misc/tradix.nim
+++ b/tests/misc/tradix.nim
@@ -13,16 +13,16 @@ type
     kind: TRadixNodeKind
   TRadixNodeLinear = object of TRadixNode
     len: int8
-    keys: array [0..31, int8]
-    vals: array [0..31, PRadixNode]
+    keys: array[0..31, int8]
+    vals: array[0..31, PRadixNode]
 
   TRadixNodeFull = object of TRadixNode
-    b: array [0..255, PRadixNode]
+    b: array[0..255, PRadixNode]
   TRadixNodeLeafBits = object of TRadixNode
-    b: array [0..7, int]
+    b: array[0..7, int]
   TRadixNodeLeafLinear = object of TRadixNode
     len: int8
-    keys: array [0..31, int8]
+    keys: array[0..31, int8]
 
 var
   root: PRadixNode
diff --git a/tests/misc/tstrdesc.nim b/tests/misc/tstrdesc.nim
index d23160315..1479fcda8 100644
--- a/tests/misc/tstrdesc.nim
+++ b/tests/misc/tstrdesc.nim
@@ -1,12 +1,12 @@
 var
-  x: array [0..2, int]
+  x: array[0..2, int]
 
 x = [0, 1, 2]
 
 type
   TStringDesc {.final.} = object
     len, space: int # len and space without counting the terminating zero
-    data: array [0..0, char] # for the '\0' character
+    data: array[0..0, char] # for the '\0' character
 
 var
   emptyString {.exportc: "emptyString".}: TStringDesc
diff --git a/tests/misc/tvarnums.nim b/tests/misc/tvarnums.nim
index 04a1ef53b..a5c30c7eb 100644
--- a/tests/misc/tvarnums.nim
+++ b/tests/misc/tvarnums.nim
@@ -8,7 +8,7 @@ import
   strutils
 
 type
-  TBuffer = array [0..10, int8]
+  TBuffer = array[0..10, int8]
 
 proc toVarNum(x: int32, b: var TBuffer) =
   # encoding: first bit indicates end of number (0 if at end)
diff --git a/tests/stdlib/tmath2.nim b/tests/stdlib/tmath2.nim
index 84a49efa9..eb0506f5f 100644
--- a/tests/stdlib/tmath2.nim
+++ b/tests/stdlib/tmath2.nim
@@ -64,7 +64,7 @@ proc TestLoops() =
 
 var
   glob: int
-  a: array [0..5, int]
+  a: array[0..5, int]
 
 proc main() =
   #glob = 0
diff --git a/tests/stdlib/trepr2.nim b/tests/stdlib/trepr2.nim
index a92024851..300df565d 100644
--- a/tests/stdlib/trepr2.nim
+++ b/tests/stdlib/trepr2.nim
@@ -6,7 +6,7 @@ type
 
   TPoint {.final.} = object
     x, y, z: int
-    s: array [0..1, string]
+    s: array[0..1, string]
     e: TEnum
 
 var
diff --git a/tests/stdlib/tstrset.nim b/tests/stdlib/tstrset.nim
index 15024c3f1..1b253f862 100644
--- a/tests/stdlib/tstrset.nim
+++ b/tests/stdlib/tstrset.nim
@@ -7,10 +7,10 @@ type
     kind: TRadixNodeKind
   TRadixNodeLinear = object of TRadixNode
     len: int8
-    keys: array [0..31, char]
-    vals: array [0..31, PRadixNode]
+    keys: array[0..31, char]
+    vals: array[0..31, PRadixNode]
   TRadixNodeFull = object of TRadixNode
-    b: array [char, PRadixNode]
+    b: array[char, PRadixNode]
   TRadixNodeLeaf = object of TRadixNode
     s: string
   PRadixNodeLinear = ref TRadixNodeLinear
diff --git a/tests/threads/tthreadanalysis.nim b/tests/threads/tthreadanalysis.nim
index 5b0b666ac..8aacc71d1 100644
--- a/tests/threads/tthreadanalysis.nim
+++ b/tests/threads/tthreadanalysis.nim
@@ -9,7 +9,7 @@ discard """
 import os
 
 var
-  thr: array [0..5, Thread[tuple[a, b: int]]]
+  thr: array[0..5, Thread[tuple[a, b: int]]]
 
 proc doNothing() = discard
 
diff --git a/tests/threads/tthreadanalysis2.nim b/tests/threads/tthreadanalysis2.nim
index 93d169f0b..c1ec3ae39 100644
--- a/tests/threads/tthreadanalysis2.nim
+++ b/tests/threads/tthreadanalysis2.nim
@@ -8,7 +8,7 @@ discard """
 import os
 
 var
-  thr: array [0..5, Thread[tuple[a, b: int]]]
+  thr: array[0..5, Thread[tuple[a, b: int]]]
 
 proc doNothing() = discard
 
diff --git a/tests/varres/tvarres3.nim b/tests/varres/tvarres3.nim
index 9fcd79bfc..9a46bfb4e 100644
--- a/tests/varres/tvarres3.nim
+++ b/tests/varres/tvarres3.nim
@@ -6,7 +6,7 @@ var
   g = 5
 
 proc p(): var int =
-  var bla = addr(g) #: array [0..7, int]
+  var bla = addr(g) #: array[0..7, int]
   result = bla[]
 
 p() = 45
diff --git a/tests/vm/tarrayboundeval.nim b/tests/vm/tarrayboundeval.nim
index af9e33339..dc8c7ebdc 100644
--- a/tests/vm/tarrayboundeval.nim
+++ b/tests/vm/tarrayboundeval.nim
@@ -25,7 +25,7 @@ echo myconst, " ", int((KeyMax + 31) / 32)
 
 #bug 1304 or something:
 
-const constArray: array [-3..2, int] = [-3, -2, -1, 0, 1, 2]
+const constArray: array[-3..2, int] = [-3, -2, -1, 0, 1, 2]
 
 echo constArray[-2]