Created
September 5, 2016 13:07
-
-
Save keizo042/69429a3b0e851990db3739b2fbc89829 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// when depoyment | |
// | |
// $ gcc sample.c main.c -o sample | |
// when testing | |
// | |
// $ gcc -DDEBUG sample.c test/test_main.c -o test/test | |
#include <stdio.h> | |
#define FAIL 1 | |
#define SUCCESS 0 | |
static int | |
f() | |
{ | |
return 1; | |
} | |
#ifdef DEBUG | |
int f_test() | |
{ | |
if(f() != 1) | |
{ | |
printf("fail\n"); | |
return FAIL; | |
} | |
return SUCCESS; | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment