Skip to content

Instantly share code, notes, and snippets.

@pervognsen
Created November 20, 2010 19:49
Show Gist options
  • Save pervognsen/708096 to your computer and use it in GitHub Desktop.
Save pervognsen/708096 to your computer and use it in GitHub Desktop.
asdf
#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