tests: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
This commit is contained in:
parent
ac9c1cd6b9
commit
e80465dacf
372 changed files with 4486 additions and 4486 deletions
|
|
@ -22,8 +22,8 @@ else:
|
|||
|
||||
proc newLit(x: int): PNode {.importc: "newLit", dynlib: dllname.}
|
||||
proc newOp(k: TNodeKind, a, b: PNode): PNode {.
|
||||
importc: "newOp", dynlib: dllname.}
|
||||
proc buildTree(x: int): PNode {.importc: "buildTree", dynlib: dllname.}
|
||||
importc: "newOp", dynlib: dllname.}
|
||||
proc buildTree(x: int): PNode {.importc: "buildTree", dynlib: dllname.}
|
||||
|
||||
proc eval(n: PNode): int =
|
||||
case n.k
|
||||
|
|
@ -36,6 +36,6 @@ proc eval(n: PNode): int =
|
|||
# Test the GC:
|
||||
for i in 0..100_000:
|
||||
discard eval(buildTree(2))
|
||||
|
||||
|
||||
echo "Done"
|
||||
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ type
|
|||
else: a, b: ref TNode
|
||||
|
||||
PNode = ref TNode
|
||||
|
||||
|
||||
proc newLit(x: int): PNode {.exportc: "newLit", dynlib.} =
|
||||
new(result)
|
||||
result.x = x
|
||||
|
||||
|
||||
proc newOp(k: TNodeKind, a, b: PNode): PNode {.exportc: "newOp", dynlib.} =
|
||||
assert a != nil
|
||||
assert b != nil
|
||||
|
|
@ -22,13 +22,13 @@ proc newOp(k: TNodeKind, a, b: PNode): PNode {.exportc: "newOp", dynlib.} =
|
|||
result.k = k
|
||||
result.a = a
|
||||
result.b = b
|
||||
|
||||
proc buildTree(x: int): PNode {.exportc: "buildTree", dynlib.} =
|
||||
|
||||
proc buildTree(x: int): PNode {.exportc: "buildTree", dynlib.} =
|
||||
result = newOp(nkMul, newOp(nkAdd, newLit(x), newLit(x)), newLit(x))
|
||||
|
||||
when false:
|
||||
# Test the GC:
|
||||
for i in 0..100_000:
|
||||
discard buildTree(2)
|
||||
|
||||
|
||||
echo "Done"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue