summary refs log tree commit diff stats
path: root/tests/macros
diff options
context:
space:
mode:
Diffstat (limited to 'tests/macros')
-rw-r--r--tests/macros/tclosuremacro.nim2
-rw-r--r--tests/macros/tmacro2.nim4
-rw-r--r--tests/macros/tmacrogenerics.nim2
-rw-r--r--tests/macros/tmacrostmt.nim2
-rw-r--r--tests/macros/tprintf.nim20
-rw-r--r--tests/macros/tquotewords.nim4
-rw-r--r--tests/macros/tstaticparamsmacro.nim4
-rw-r--r--tests/macros/tvtable.nim2
8 files changed, 20 insertions, 20 deletions
diff --git a/tests/macros/tclosuremacro.nim b/tests/macros/tclosuremacro.nim
index d5d9b656c..cf51949ed 100644
--- a/tests/macros/tclosuremacro.nim
+++ b/tests/macros/tclosuremacro.nim
@@ -29,7 +29,7 @@ proc doWithOneAndTwo(f: (int, int) -> int): int =
 echo twoParams(proc (a, b): auto = a + b)
 echo twoParams((x, y) => x + y)
 
-echo oneParam(x => x+5) 
+echo oneParam(x => x+5)
 
 echo noParams(() => 3)
 
diff --git a/tests/macros/tmacro2.nim b/tests/macros/tmacro2.nim
index 8515322d5..17f312925 100644
--- a/tests/macros/tmacro2.nim
+++ b/tests/macros/tmacro2.nim
@@ -4,7 +4,7 @@ discard """
 
 import macros, strutils
 
-proc testBlock(): string {.compileTime.} = 
+proc testBlock(): string {.compileTime.} =
   block myBlock:
     while true:
       echo "inner block"
@@ -21,7 +21,7 @@ macro mac(n: expr): expr =
   s = s.replace("l", "!!")
   result = newStrLitNode("Your value sir: '$#'" % [s])
 
-const s = testBlock() 
+const s = testBlock()
 const t = mac("HEllo World")
 echo s, " ", t
 
diff --git a/tests/macros/tmacrogenerics.nim b/tests/macros/tmacrogenerics.nim
index b886f4fa5..919a15b46 100644
--- a/tests/macros/tmacrogenerics.nim
+++ b/tests/macros/tmacrogenerics.nim
@@ -16,7 +16,7 @@ macro makeBar(A, B: typedesc): typedesc =
   echo "instantiation ", counter, " with ", A.name, " and ", B.name
   result = A
 
-type 
+type
   Bar[T, U] = makeBar(T, U)
 
 var bb1: Bar[int, float]
diff --git a/tests/macros/tmacrostmt.nim b/tests/macros/tmacrostmt.nim
index d9c70197d..23e2f358c 100644
--- a/tests/macros/tmacrostmt.nim
+++ b/tests/macros/tmacrostmt.nim
@@ -13,7 +13,7 @@ of r"[\+\-\*\?]+":
   return tkOperator
 else:
   return tkUnknown
-  
+
 case_token: inc i
 
 #bug #488
diff --git a/tests/macros/tprintf.nim b/tests/macros/tprintf.nim
index c8fb51cdc..94cbfbc2b 100644
--- a/tests/macros/tprintf.nim
+++ b/tests/macros/tprintf.nim
@@ -2,15 +2,15 @@ discard """
   file: "tprintf.nim"
   output: "Andreas Rumpf"
 """
-# Test a printf proc

-

-proc printf(file: TFile, args: openarray[string]) =

-  var i = 0

-  while i < args.len:

-    write(file, args[i])

-    inc(i)

-

-printf(stdout, ["Andreas ", "Rumpf\n"])

-#OUT Andreas Rumpf

+# Test a printf proc
+
+proc printf(file: TFile, args: openarray[string]) =
+  var i = 0
+  while i < args.len:
+    write(file, args[i])
+    inc(i)
+
+printf(stdout, ["Andreas ", "Rumpf\n"])
+#OUT Andreas Rumpf
 
 
diff --git a/tests/macros/tquotewords.nim b/tests/macros/tquotewords.nim
index 76b8d8af7..7a575f541 100644
--- a/tests/macros/tquotewords.nim
+++ b/tests/macros/tquotewords.nim
@@ -6,13 +6,13 @@ discard """
 
 import macros
 
-macro quoteWords(n: expr): expr {.immediate.} = 
+macro quoteWords(n: expr): expr {.immediate.} =
   let n = callsite()
   result = newNimNode(nnkBracket, n)
   for i in 1..n.len-1:
     expectKind(n[i], nnkIdent)
     result.add(toStrLit(n[i]))
-  
+
 const
   myWordList = quoteWords(this, an, example)
 
diff --git a/tests/macros/tstaticparamsmacro.nim b/tests/macros/tstaticparamsmacro.nim
index 1ab638396..f6ecb3a9f 100644
--- a/tests/macros/tstaticparamsmacro.nim
+++ b/tests/macros/tstaticparamsmacro.nim
@@ -5,9 +5,9 @@ bb
 numbers
 11
 22
-AST a 
+AST a
 [(11, 22), (33, 44)]
-AST b 
+AST b
 (e: [55, 66], f: [77, 88])
 55
 10
diff --git a/tests/macros/tvtable.nim b/tests/macros/tvtable.nim
index 3e3b9c0e6..cc5d7a5d9 100644
--- a/tests/macros/tvtable.nim
+++ b/tests/macros/tvtable.nim
@@ -17,7 +17,7 @@ type
   # an untyped table to store the proc pointers
   # it's also possible to use a strongly typed tuple here
   VTable = array[0..1, pointer]
-  
+
   TBase = object {.inheritable.}
     vtbl: ptr VTable