]> gitweb.factorcode.org Git - factor.git/blob - vm/assert.hpp
audio.engine.test: cleanup using
[factor.git] / vm / assert.hpp
1 namespace factor { void abort(); }
2
3 #ifdef FACTOR_DEBUG
4 #define FACTOR_ASSERT(condition)                                               \
5   ((condition)                                                                 \
6        ? (void)0                                                               \
7        : (::fprintf(stderr, "assertion \"%s\" failed: file \"%s\", line %d\n", \
8                     #condition, __FILE__, __LINE__),                           \
9           ::factor::abort()))
10 #else
11 #define FACTOR_ASSERT(condition) ((void)0)
12 #endif