diff options
author | Zahary Karadjov <zahary@gmail.com> | 2012-03-20 14:44:23 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2012-03-20 14:44:23 +0200 |
commit | a72fe16f9d800214e84fa496174dc255598b5a22 (patch) | |
tree | 027d1a5c5ebacabbdf081ca1ed7a2993e971ef01 /tests/run | |
parent | 7b41b0f84113d3b9901d5c598dd909a1df6f960f (diff) | |
download | Nim-a72fe16f9d800214e84fa496174dc255598b5a22.tar.gz |
making tests green again
Diffstat (limited to 'tests/run')
-rw-r--r-- | tests/run/tstringinterp.nim | 8 | ||||
-rw-r--r-- | tests/run/tusingstatement.nim | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/run/tstringinterp.nim b/tests/run/tstringinterp.nim index e1a55c94b..423e7bb61 100644 --- a/tests/run/tstringinterp.nim +++ b/tests/run/tstringinterp.nim @@ -26,7 +26,7 @@ macro formatStyleInterpolation(e: expr): expr = proc addString(s: string) = formatString.add(s) - proc addExpr(e: expr) = + proc addExpr(e: PNimrodNode) = arrayNode.add(e) formatString.add("$" & $(idx)) inc idx @@ -44,9 +44,9 @@ macro concatStyleInterpolation(e: expr): expr = var args: seq[PNimrodNode] newSeq(args, 0) - proc addString(s: string) = args.add(newStrLitNode(s)) - proc addExpr(e: expr) = args.add(e) - proc addDollar() = args.add(newStrLitNode"$") + proc addString(s: string) = args.add(newStrLitNode(s)) + proc addExpr(e: PNimrodNode) = args.add(e) + proc addDollar() = args.add(newStrLitNode"$") ProcessInterpolations(e) diff --git a/tests/run/tusingstatement.nim b/tests/run/tusingstatement.nim index 0017af556..ff81684a1 100644 --- a/tests/run/tusingstatement.nim +++ b/tests/run/tusingstatement.nim @@ -26,7 +26,7 @@ import # `opened` here could be an overloaded proc which any type can define. # A common practice can be returing an Optional[Resource] obj for which # `opened` is defined to `optional.hasValue` -macro using(e: expr) : stmt = +macro using(e: expr): stmt = if e.len != 2: error "Using statement: unexpected number of arguments. Got " & $e.len & ", expected: 1 or more variable assignments and a block" @@ -81,7 +81,7 @@ macro using(e: expr) : stmt = targetAst[0][1][1][0] = body targetAst[0][1][1][1][0] = finallyBlock - return targetAst + result = targetAst type TResource* = object |