int main() { CHECK_EQ(false, testSingle(0)); CHECK_EQ(false, testMultiple(0)); CHECK_EQ(false, testVirtual(0)); CHECK_EQ(false, testUnspecified(0)); CHECK_EQ(true, testSingle(&Single::foo)); CHECK_EQ(true, testMultiple(&Multiple::foo)); CHECK_EQ(true, testVirtual(&Virtual::foo)); CHECK_EQ(true, testUnspecified(&Unspecified::foo)); // We only need to test the method pointer (slot 0) to know if the memptr is // non-null. Full equality requires more comparisons. CHECK_EQ(false, testUnspecified(g_unspecified_memptr)); }
int ArgumentParserTest::regressionTest(){ int retval = 0; utils::enableDebug(); retval = testConstruction(); if( retval != 0 ){ goto end; } retval = testNoneMatch(); if( retval != 0 ){ goto end; } retval = testBoolMatch(); if( retval != 0 ){ goto end; } retval = testIntMatch(); if( retval != 0 ){ goto end; } retval = testStringMatch(); if( retval != 0 ){ goto end; } retval = testMultiple(); if( retval != 0 ){ goto end; } end: return retval; }