diff options
author | Zahary Karadjov <zahary@gmail.com> | 2013-12-07 20:30:44 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2013-12-07 20:30:44 +0200 |
commit | 1e26047c3b38349402858ce0a1a5bf747b9f2914 (patch) | |
tree | 99e128eb9606b64f81b01d0049e0e89d2c800224 /compiler/nimrod.nim | |
parent | a068aaed3c5ddaf05a104f3f2d0f512bab2861c6 (diff) | |
download | Nim-1e26047c3b38349402858ce0a1a5bf747b9f2914.tar.gz |
adding some provisions for writing lower-level unit tests targeting specific sub-systems of the compiler
see sigmatch as an example. tests are compiled only when the compiler is compiled with -d:selftest to execute them, just run the resulting binary without arguments
Diffstat (limited to 'compiler/nimrod.nim')
-rw-r--r-- | compiler/nimrod.nim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/nimrod.nim b/compiler/nimrod.nim index 3fa80cebb..2f10e32e3 100644 --- a/compiler/nimrod.nim +++ b/compiler/nimrod.nim @@ -76,5 +76,7 @@ when compileOption("gc", "v2") or compileOption("gc", "refc"): # the new correct mark&sweet collector is too slow :-/ GC_disableMarkAndSweep() condsyms.InitDefines() -HandleCmdLine() -quit(int8(msgs.gErrorCounter > 0)) + +when not defined(selftest): + HandleCmdLine() + quit(int8(msgs.gErrorCounter > 0)) |