#include <stdio.h> #include <stdlib.h> #define NDEBUG #include <assert.h> void t1(void) { int i = 0; assert(i == 0); assert(i == 1); } #undef NDEBUG #include <assert.h> void t2(void) { int j = 0; assert(j == 0); assert(j == 1); } #define NDEBUG #include <assert.h> int main(void) { int i = 1; assert(i == 0); t1(); printf("hello world\n"); t2(); }
原文地址:http://blog.csdn.net/wangxiaobupt/article/details/39135993