X-Git-Url: https://git.stderr.nl/gitweb?p=projects%2Fchimara%2Fchimara.git;a=blobdiff_plain;f=tests%2Funit%2Fglkunit.h;fp=tests%2Funit%2Fglkunit.h;h=e50d19fc820cf97e97e1d996fb0c213ced1475a1;hp=3828987b739c2fc6b73f20e8d1bc3f5cc09dbcd8;hb=9ee259d9a29d83d79d912d1716b4044c63e90343;hpb=ad091d02678a632f0f91f26072bbec29eba4c66e diff --git a/tests/unit/glkunit.h b/tests/unit/glkunit.h index 3828987..e50d19f 100644 --- a/tests/unit/glkunit.h +++ b/tests/unit/glkunit.h @@ -15,7 +15,10 @@ #define SUCCEED _BEGIN return 1; _END #define ASSERT(expr) _ASSERT(expr, "%s", #expr) -#define ASSERT_EQUAL(expected, actual) _ASSERT((expected) == (actual), "%s == %s", #expected, #actual); +/* This macro is meant for int-like things that can print with %d */ +#define ASSERT_EQUAL(expected, actual) _ASSERT((expected) == (actual), \ + "%s == %s (expected %d, was %d)", \ + #actual, #expected, expected, actual); struct TestDescription { char *name;