new tester; all tests categorized
This commit is contained in:
parent
51ee524109
commit
20b5f31c03
481 changed files with 794 additions and 2506 deletions
16
tests/proc/tnestprc.nim
Normal file
16
tests/proc/tnestprc.nim
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
discard """
|
||||
file: "tnestprc.nim"
|
||||
output: "10"
|
||||
"""
|
||||
# Test nested procs without closures
|
||||
|
||||
proc Add3(x: int): int =
|
||||
proc add(x, y: int): int {.noconv.} =
|
||||
result = x + y
|
||||
|
||||
result = add(x, 3)
|
||||
|
||||
echo Add3(7) #OUT 10
|
||||
|
||||
|
||||
|
||||
9
tests/proc/tprocredef.nim
Normal file
9
tests/proc/tprocredef.nim
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
discard """
|
||||
file: "tprocredef.nim"
|
||||
line: 8
|
||||
errormsg: "redefinition of \'foo\'"
|
||||
"""
|
||||
|
||||
proc foo(a: int, b: string) = nil
|
||||
proc foo(a: int, b: string) = nil
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue