tests: Trim .nim files trailing whitespace

via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
This commit is contained in:
Adam Strzelecki 2015-09-04 23:04:32 +02:00
commit e80465dacf
372 changed files with 4486 additions and 4486 deletions

View file

@ -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)

View file

@ -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

View file

@ -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]

View file

@ -13,7 +13,7 @@ of r"[\+\-\*\?]+":
return tkOperator
else:
return tkUnknown
case_token: inc i
#bug #488

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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