#define CHECK1(orig, match) \
check1(#orig, CPPMAGIC_STRINGIFY(orig), match)
+#define TESTRECURSE() R CPPMAGIC_DEFER1(_TESTRECURSE)()()
+#define _TESTRECURSE() TESTRECURSE
+
int main(void)
{
- plan_tests(24);
+ plan_tests(27);
CHECK1(CPPMAGIC_NOTHING(), "");
CHECK1(CPPMAGIC_GLUE2(a, b), "ab");
CHECK1(CPPMAGIC_IFELSE(1)(abc)(def), "abc");
CHECK1(CPPMAGIC_IFELSE(not zero)(abc)(def), "abc");
+ CHECK1(TESTRECURSE(), "R R _TESTRECURSE ()()");
+ CHECK1(CPPMAGIC_EVAL1(TESTRECURSE()), "R R R _TESTRECURSE ()()");
+ CHECK1(CPPMAGIC_EVAL2(TESTRECURSE()), "R R R R R _TESTRECURSE ()()");
+
/* This exits depending on whether all tests passed */
return exit_status();
}