diff options
author | Zahary Karadjov <zahary@gmail.com> | 2011-12-07 00:57:52 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2011-12-07 00:57:52 +0200 |
commit | e13a610ad42ef4d5d0222a2a942682d35e405dc7 (patch) | |
tree | 7d277754c6d31c85698445d2db0a7d8ee068602f | |
parent | 0e609d2101535b4ca2640b68890b2c575ed3678d (diff) | |
download | Nim-e13a610ad42ef4d5d0222a2a942682d35e405dc7.tar.gz |
The test runner will print out encountered exceptions
-rw-r--r-- | lib/pure/unittest.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pure/unittest.nim b/lib/pure/unittest.nim index e2906dd1a..f9981195c 100644 --- a/lib/pure/unittest.nim +++ b/lib/pure/unittest.nim @@ -70,6 +70,10 @@ template test*(name: expr, body: stmt): stmt = TestSetupIMPL() body + except: + checkpoint("Unhandled exception: " & getCurrentExceptionMsg()) + fail() + finally: TestTeardownIMPL() testDone name, TestStatusIMPL |