diff options
author | Araq <rumpf_a@web.de> | 2011-10-30 20:53:04 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-10-30 20:53:04 +0100 |
commit | c517639155d50e32606583092bdfb3538ee76cf7 (patch) | |
tree | bf2c97c7818637693799cae3fd282bd765d80ebd /tests/tester.nim | |
parent | 78f37b233654a33b4f7ee0427a80043cea54a61a (diff) | |
download | Nim-c517639155d50e32606583092bdfb3538ee76cf7.tar.gz |
lazy loading of body ast implemented
Diffstat (limited to 'tests/tester.nim')
-rwxr-xr-x | tests/tester.nim | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/tests/tester.nim b/tests/tester.nim index f0e48c4e6..5d596bc55 100755 --- a/tests/tester.nim +++ b/tests/tester.nim @@ -272,42 +272,53 @@ proc run(r: var TResults, dir, options: string) = const rodfilesDir = "tests/rodfiles" -proc delNimCache() = removeDir(rodfilesDir / "nimcache") +proc delNimCache() = + try: + removeDir(rodfilesDir / "nimcache") + except EOS: + nil + proc plusCache(options: string): string = return options & " --symbolFiles:on" proc runRodFiles(r: var TResults, options: string) = + template test(filename: expr): stmt = + runSingleTest(r, rodfilesDir / filename, options) + var options = options.plusCache delNimCache() # test basic recompilation scheme: - runSingleTest(r, rodfilesDir / "hallo", options) - runSingleTest(r, rodfilesDir / "hallo", options) + test "hallo" + test "hallo" # test incremental type information: - runSingleTest(r, rodfilesDir / "hallo2", options) + test "hallo2" delNimCache() # test type converters: - runSingleTest(r, rodfilesDir / "aconv", options) - runSingleTest(r, rodfilesDir / "bconv", options) + test "aconv" + test "bconv" delNimCache() # test G, A, B example from the documentation; test init sections: - runSingleTest(r, rodfilesDir / "deada", options) - runSingleTest(r, rodfilesDir / "deada2", options) + test "deada" + test "deada2" delNimCache() # test method generation: - runSingleTest(r, rodfilesDir / "bmethods", options) - runSingleTest(r, rodfilesDir / "bmethods2", options) + test "bmethods" + test "bmethods2" delNimCache() proc compileRodFiles(r: var TResults, options: string) = + template test(filename: expr): stmt = + compileSingleTest(r, rodfilesDir / filename, options) + var options = options.plusCache delNimCache() # test DLL interfacing: - compileSingleTest(r, rodfilesDir / "gtkex1", options) - compileSingleTest(r, rodfilesDir / "gtkex2", options) + test "gtkex1" + test "gtkex2" delNimCache() # ----------------------------------------------------------------------------- |