コード例 #1
0
ファイル: testCalls.cpp プロジェクト: khzaw/xcalibur
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));
}
コード例 #2
0
ファイル: testCalls.cpp プロジェクト: khzaw/xcalibur
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;
}