summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorJuan Carlos <juancarlospaco@gmail.com>2020-07-14 11:44:56 -0300
committerGitHub <noreply@github.com>2020-07-14 16:44:56 +0200
commit9465b5db443b98d7ac2c1683e986716fb9a9290f (patch)
tree47e6b4eaf5c66c364f8d6bde2bb904296902fe87 /tests
parent2b0e336c971401d06797240686722ce669d902b9 (diff)
downloadNim-9465b5db443b98d7ac2c1683e986716fb9a9290f.tar.gz
Clean up macros (#14959)
Diffstat (limited to 'tests')
-rw-r--r--tests/macros/tmemit.nim3
-rw-r--r--tests/showoff/tformatopt.nim2
-rw-r--r--tests/usingstmt/tusingstatement.nim2
3 files changed, 2 insertions, 5 deletions
diff --git a/tests/macros/tmemit.nim b/tests/macros/tmemit.nim
index 06ab8a1e2..6c9f9f935 100644
--- a/tests/macros/tmemit.nim
+++ b/tests/macros/tmemit.nim
@@ -1,6 +1,5 @@
 discard """
   output: '''
-HELLO WORLD
 c_func
 12
 '''
@@ -8,8 +7,6 @@ c_func
 
 import macros, strutils
 
-emit("echo " & '"' & "hello world".toUpperAscii & '"')
-
 # bug #1025
 
 macro foo(icname): untyped =
diff --git a/tests/showoff/tformatopt.nim b/tests/showoff/tformatopt.nim
index 6e790c38e..420dd026b 100644
--- a/tests/showoff/tformatopt.nim
+++ b/tests/showoff/tformatopt.nim
@@ -37,7 +37,7 @@ macro optFormat{`%`(f, a)}(f: string{lit}, a: openArray[string]): untyped =
   result = newNimNode(nnkBracket)
   let f = f.strVal
   formatImpl(newLit)
-  result = nestList(!"&", result)
+  result = nestList(newIdentNode("&"), result)
 
 template optAdd1{x = y; add(x, z)}(x, y, z: string) =
   x = y & z
diff --git a/tests/usingstmt/tusingstatement.nim b/tests/usingstmt/tusingstatement.nim
index 6e4998892..dd4cf589d 100644
--- a/tests/usingstmt/tusingstatement.nim
+++ b/tests/usingstmt/tusingstatement.nim
@@ -38,7 +38,7 @@ macro autoClose(args: varargs[untyped]): untyped =
       varAssignment.add(varValue)
       variables.add(varAssignment)
 
-      closingCalls.add(newCall(!"close", varName))
+      closingCalls.add(newCall(newIdentNode("close"), varName))
     else:
       error "Using statement: Unexpected expression. Got " &
         $args[i].kind & " instead of assignment."