void CallsTest::testIsCalls(){ Calls c; CallsExtractor extractor(&c); c.insertCalls(1,2); c.insertCalls(2,3); c.insertCalls(1,3); extractor.construct(); CPPUNIT_ASSERT_EQUAL(true,c.isCalls(1,2)); CPPUNIT_ASSERT_EQUAL(true,c.isCalls(2,3)); CPPUNIT_ASSERT_EQUAL(true,c.isCalls(1,3)); }
void CallsTest::testInsertCalls(){ Calls c; CallsExtractor extractor(&c); c.insertCalls(1,2); c.insertCalls(2,3); c.insertCalls(1,3); c.insertCalls(1,4); c.insertCalls(4,5); extractor.construct(); CPPUNIT_ASSERT(c.isCalls(1,2)); CPPUNIT_ASSERT(c.isCalls(1,3)); CPPUNIT_ASSERT(c.isCalls(1,4)); CPPUNIT_ASSERT(c.isCalls(2,3)); CPPUNIT_ASSERT(c.isCalls(4,5)); CPPUNIT_ASSERT_EQUAL(5,c.getSize()); return; }