diff options
Diffstat (limited to 'include/assert.h')
-rw-r--r-- | include/assert.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/assert.h b/include/assert.h new file mode 100644 index 000000000..8004c4bad --- /dev/null +++ b/include/assert.h @@ -0,0 +1,21 @@ +#ifndef __ASSERT_H__ +#define __ASSERT_H__ + +#include <stdio.h> + +static __inline void __assert(int Cond) +{ +#ifdef _DEBUG + if (Cond) + { + printf("assertion occured.\n"); + __asm int 3; + while (1); + } +#endif +} + +#define assert(Cond) __assert((int)(Cond)) + +#endif +
\ No newline at end of file |