diff options
author | Adam Strzelecki <ono@java.pl> | 2015-09-04 23:04:32 +0200 |
---|---|---|
committer | Adam Strzelecki <ono@java.pl> | 2015-09-04 23:04:32 +0200 |
commit | e80465dacf50f260abec30ae57d37b298c93fd83 (patch) | |
tree | 393394f8353a4adb49f95e6f13da1fd41681b7b3 /tests/overload | |
parent | ac9c1cd6b980d4f00eeb52d1109d8e2c8cd21213 (diff) | |
download | Nim-e80465dacf50f260abec30ae57d37b298c93fd83.tar.gz |
tests: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
Diffstat (limited to 'tests/overload')
-rw-r--r-- | tests/overload/toverl2.nim | 6 | ||||
-rw-r--r-- | tests/overload/toverl3.nim | 6 | ||||
-rw-r--r-- | tests/overload/toverl4.nim | 2 | ||||
-rw-r--r-- | tests/overload/toverwr.nim | 26 |
4 files changed, 20 insertions, 20 deletions
diff --git a/tests/overload/toverl2.nim b/tests/overload/toverl2.nim index ea0249e9f..54714ac1b 100644 --- a/tests/overload/toverl2.nim +++ b/tests/overload/toverl2.nim @@ -9,9 +9,9 @@ import strutils proc toverl2(x: int): string = return $x proc toverl2(x: bool): string = return $x -iterator toverl2(x: int): int = +iterator toverl2(x: int): int = var res = 0 - while res < x: + while res < x: yield res inc(res) @@ -20,7 +20,7 @@ var stdout.write(pp(true)) -for x in toverl2(3): +for x in toverl2(3): stdout.write(toverl2(x)) block: diff --git a/tests/overload/toverl3.nim b/tests/overload/toverl3.nim index b3e0f2fa7..92cfc150d 100644 --- a/tests/overload/toverl3.nim +++ b/tests/overload/toverl3.nim @@ -4,8 +4,8 @@ discard """ tup1''' """ -# Tests more specific generic match: - +# Tests more specific generic match: + proc m[T](x: T) = echo "m2" proc m[T](x: var ref T) = echo "m1" @@ -15,6 +15,6 @@ proc tup[S, T](x: tuple[a: S, b: T]) = echo "tup2" var obj: ref int tu: tuple[a: int, b: ref bool] - + m(obj) tup(tu) diff --git a/tests/overload/toverl4.nim b/tests/overload/toverl4.nim index 6bb3a53d1..b63265bdf 100644 --- a/tests/overload/toverl4.nim +++ b/tests/overload/toverl4.nim @@ -74,4 +74,4 @@ proc add*[TKey, TData](root: var PElement[TKey, TData], key: TKey, data: TData) var tree = PElement[int, int](kind: ElementKind.inner, key: 0, left: nil, right: nil) let result = add(tree, 1, 1) -echo(result) \ No newline at end of file +echo(result) diff --git a/tests/overload/toverwr.nim b/tests/overload/toverwr.nim index 32d50faaa..5945a6149 100644 --- a/tests/overload/toverwr.nim +++ b/tests/overload/toverwr.nim @@ -1,13 +1,13 @@ -discard """ - file: "toverwr.nim" - output: "hello" -""" -# Test the overloading resolution in connection with a qualifier - -proc write(t: TFile, s: string) = - discard # a nop - -system.write(stdout, "hello") -#OUT hello - - +discard """ + file: "toverwr.nim" + output: "hello" +""" +# Test the overloading resolution in connection with a qualifier + +proc write(t: TFile, s: string) = + discard # a nop + +system.write(stdout, "hello") +#OUT hello + + |