got rid of 'accept' dir in the tests

This commit is contained in:
Araq 2011-11-19 15:45:51 +01:00
commit a274f3bf5b
264 changed files with 5 additions and 7 deletions

32
tests/run/tprocvar.nim Executable file
View file

@ -0,0 +1,32 @@
discard """
file: "tprocvar.nim"
output: "papbpcpdpe7"
"""
# test variables of type proc
proc pa() {.cdecl.} = write(stdout, "pa")
proc pb() {.cdecl.} = write(stdout, "pb")
proc pc() {.cdecl.} = write(stdout, "pc")
proc pd() {.cdecl.} = write(stdout, "pd")
proc pe() {.cdecl.} = write(stdout, "pe")
const
algos = [pa, pb, pc, pd, pe]
var
x: proc (a, b: int): int {.cdecl.}
proc ha(c, d: int): int {.cdecl.} =
echo(c + d)
result = c + d
for a in items(algos):
a()
x = ha
discard x(3, 4)
#OUT papbpcpdpe7