Created
November 20, 2010 19:49
-
-
Save pervognsen/708096 to your computer and use it in GitHub Desktop.
asdf
This file contains 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
#include <assert.h> | |
#if TESTING | |
static int testing; | |
#endif | |
PRE_TEST | |
{ | |
printf("pre test\n"); | |
testing = 42; | |
} | |
TEST(add1) { IS(1 + 2 == 3); } | |
TEST(add2) { IS(42 + 0 == 0); } | |
TEST(add3) { IS(-42 + 42 == 0); } | |
POST_TEST | |
{ | |
assert(testing == 42); | |
testing = 0; | |
printf("post test\n"); | |
} | |
int main(int argc, const char **argv) | |
{ | |
// TEST_MAIN; | |
test_run(); | |
getchar(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment