tests: fail build if NDEBUG is defined
authorPekka Paalanen <ppaalanen@gmail.com>
Thu, 19 Apr 2012 09:14:19 +0000 (12:14 +0300)
committerPekka Paalanen <ppaalanen@gmail.com>
Thu, 19 Apr 2012 09:14:19 +0000 (12:14 +0300)
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
tests/test-runner.h

index 238e613..253df81 100644 (file)
@@ -1,6 +1,10 @@
 #ifndef _TEST_RUNNER_H_
 #define _TEST_RUNNER_H_
 
+#ifdef NDEBUG
+#error "Tests must not be built with NDEBUG defined, they rely on assert()."
+#endif
+
 struct test {
        const char *name;
        void (*run)(void);