summary refs log tree commit diff stats
path: root/compiler/testability.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-12-13 15:58:03 +0100
committerAraq <rumpf_a@web.de>2013-12-13 15:58:03 +0100
commit8c553fa8a2e9476c67c6348bf64c02ea0f19a679 (patch)
treece32cf3cd815f4dbb7e5f0f00942f43e1a7871c0 /compiler/testability.nim
parent328f1932925889d5bb7f91c68fb1504b9b26ba8c (diff)
parent01661daf76daa713d25d06d202f83c842a6f1fe3 (diff)
downloadNim-8c553fa8a2e9476c67c6348bf64c02ea0f19a679.tar.gz
Merge branch 'master' into vm2
Diffstat (limited to 'compiler/testability.nim')
-rw-r--r--compiler/testability.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/testability.nim b/compiler/testability.nim
new file mode 100644
index 000000000..ceefd0a5e
--- /dev/null
+++ b/compiler/testability.nim
@@ -0,0 +1,5 @@
+template tests*(body: stmt) {.immediate.} =
+  when defined(selftest):
+    when not defined(unittest): import unittest
+    body
+