new tester; all tests categorized

This commit is contained in:
Araq 2014-01-13 02:10:03 +01:00
commit 20b5f31c03
481 changed files with 794 additions and 2506 deletions

View file

@ -1,20 +0,0 @@
discard """
file: "tclosure3.nim"
output: "success"
"""
proc main =
const n = 30
for iterations in 0..50_000:
var s: seq[proc(): string {.closure.}] = @[]
for i in 0 .. n-1:
let ii = i
s.add(proc(): string = return $(ii*ii))
for i in 0 .. n-1:
let val = s[i]()
if val != $(i*i): echo "bug ", val
if getOccupiedMem() > 3000_000: quit("still a leak!")
echo "success"
main()