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
|
|
@ -1,6 +1,6 @@
|
|||
import unittest, typetraits
|
||||
|
||||
type
|
||||
type
|
||||
TFoo[T, U] = object
|
||||
x: T
|
||||
y: U
|
||||
|
|
@ -21,17 +21,17 @@ proc foo(T: typedesc[int or bool]): string =
|
|||
template foo(T: typedesc[seq]): expr = "seq"
|
||||
|
||||
test "types can be used as proc params":
|
||||
# XXX: `check` needs to know that TFoo[int, float] is a type and
|
||||
# XXX: `check` needs to know that TFoo[int, float] is a type and
|
||||
# cannot be assigned for a local variable for later inspection
|
||||
check ((string.getTypeName == "string"))
|
||||
check ((getTypeName(int) == "int"))
|
||||
|
||||
|
||||
check ((foo(TFoo[int, float], 1000) == "TFoo 1000"))
|
||||
|
||||
|
||||
var f = 10.0
|
||||
check ((foo(float, "long string") == "float true"))
|
||||
check ((foo(type(f), [1, 2, 3]) == "float false"))
|
||||
|
||||
|
||||
check ((foo(int) == "int or bool 10"))
|
||||
|
||||
check ((foo(seq[int]) == "seq"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue