new tester; all tests categorized
This commit is contained in:
parent
51ee524109
commit
20b5f31c03
481 changed files with 794 additions and 2506 deletions
13
tests/metatype/utypeclasses.nim
Normal file
13
tests/metatype/utypeclasses.nim
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import unittest
|
||||
|
||||
proc concat(a, b): string =
|
||||
result = $a & $b
|
||||
|
||||
test "if proc param types are not supplied, the params are assumed to be generic":
|
||||
check concat(1, "test") == "1test"
|
||||
check concat(1, 20) == "120"
|
||||
check concat("foo", "bar") == "foobar"
|
||||
|
||||
test "explicit param types can still be specified":
|
||||
check concat[cstring, cstring]("x", "y") == "xy"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue