new tester; all tests categorized
This commit is contained in:
parent
51ee524109
commit
20b5f31c03
481 changed files with 794 additions and 2506 deletions
23
tests/typerel/trefs.nim
Normal file
23
tests/typerel/trefs.nim
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
discard """
|
||||
file: "trefs.nim"
|
||||
line: 20
|
||||
errormsg: "type mismatch"
|
||||
"""
|
||||
# test for ref types (including refs to procs)
|
||||
|
||||
type
|
||||
TProc = proc (a, b: int): int {.stdcall.}
|
||||
|
||||
proc foo(c, d: int): int {.stdcall.} =
|
||||
return 0
|
||||
|
||||
proc wrongfoo(c, e: int): int {.inline.} =
|
||||
return 0
|
||||
|
||||
var p: TProc
|
||||
p = foo
|
||||
write(stdout, "success!")
|
||||
p = wrongfoo #ERROR_MSG type mismatch
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue