コード例 #1
0
ファイル: UtilTestSuite.cpp プロジェクト: 119/vdc
CppUnit::Test* UtilTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("UtilTestSuite");

	pSuite->addTest(ConfigurationTestSuite::suite());
	pSuite->addTest(OptionsTestSuite::suite());
	pSuite->addTest(TimerTestSuite::suite());
#if defined(_MSC_VER) && !defined(_WIN32_WCE)
	pSuite->addTest(WindowsTestSuite::suite());
#endif

	return pSuite;
}
コード例 #2
0
CppUnit::Test *VoronoiRegionTest::suite()
{
	CppUnit::TestSuite *suite = new CppUnit::TestSuite("VoronoiRegionTest");

	suite->addTest(new CppUnit::TestCaller<VoronoiRegionTest>("closestPointLineSegment2D", &VoronoiRegionTest::closestPointLineSegment2D));
	suite->addTest(new CppUnit::TestCaller<VoronoiRegionTest>("closestPointLineSegment3D", &VoronoiRegionTest::closestPointLineSegment3D));

	suite->addTest(new CppUnit::TestCaller<VoronoiRegionTest>("closestPointTriangle3D", &VoronoiRegionTest::closestPointTriangle3D));

	suite->addTest(new CppUnit::TestCaller<VoronoiRegionTest>("closestPointTetrahedron", &VoronoiRegionTest::closestPointTetrahedron));

	return suite;
}
コード例 #3
0
ファイル: SharedLibraryTestSuite.cpp プロジェクト: 12307/poco
CppUnit::Test* SharedLibraryTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("SharedLibraryTestSuite");

	pSuite->addTest(ManifestTest::suite());

#if !defined(_WIN32) || defined(_DLL)
	pSuite->addTest(SharedLibraryTest::suite());
	pSuite->addTest(ClassLoaderTest::suite());
#endif

	return pSuite;
}
コード例 #4
0
ファイル: MessagesTestSuite.cpp プロジェクト: 119/vdc
CppUnit::Test* MessagesTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("MessagesTestSuite");

	pSuite->addTest(NameValueCollectionTest::suite());
	pSuite->addTest(MessageHeaderTest::suite());
	pSuite->addTest(MediaTypeTest::suite());
	pSuite->addTest(MultipartWriterTest::suite());
	pSuite->addTest(MultipartReaderTest::suite());
	pSuite->addTest(QuotedPrintableTest::suite());

	return pSuite;
}
コード例 #5
0
ファイル: main.cpp プロジェクト: nuriyevn/cppexamples
int main()
{
   // Using TestCase
   ComplexNumberTest cnt("Super test");
   cnt.runTest();


   // Using TestFixture

   CppUnit::TestCaller<ComplexNumberFixture>  testForEquality("testEquality", &ComplexNumberFixture::testEquality);

   CppUnit::TestResult resultOfEquality;
   testForEquality.run(&resultOfEquality);

   CppUnit::TestCaller<ComplexNumberFixture> testForAddition("testAddition", &ComplexNumberFixture::testAddition);
   CppUnit::TestResult resultOfAddition;

   testForAddition.run(&resultOfAddition);

   // Using TestSuite   
/* // Math Suite
   CppUnit::TestSuite math_suite;
   math_suite.addTest(new CppUnit::TestCaller<ComplexNumberFixture> ("testAddition", &ComplexNumberFixture::testAddition));
*/
   CppUnit::TestSuite suite;
   CppUnit::TestResult suite_result;
  
   suite.addTest(new CppUnit::TestCaller<ComplexNumberFixture> ("testEquality", &ComplexNumberFixture::testEquality));

   suite.addTest(new CppUnit::TestCaller<ComplexNumberFixture> ("testAddition", &ComplexNumberFixture::testAddition));

   suite.addTest(ComplexNumberSuite::suite());

   suite.run(&suite_result);

   
   // Using suite method

   CppUnit::TextUi::TestRunner runner;
   CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
   runner.addTest(registry.makeTest());

   bool wasSuccessful = runner.run();
   if (wasSuccessful)
      cout << "Was successful" << endl;
   else
      cout << "Was unsuccessful" << endl;
   
   Complex c(7);
   cout << c << endl;
}
コード例 #6
0
ファイル: testcomplex2.cpp プロジェクト: alannet/example
CppUnit::Test* CTestComplex2::suite()
{
    typedef void (CTestComplex2::* TestMethod)();
    TestMethod p;

    CppUnit::TestSuite *suiteOfTests = new CppUnit::TestSuite( "ComplexTest" );
    
    p = &CTestComplex2::testEqual;
    suiteOfTests->addTest(new CppUnit::TestCaller<CTestComplex2>("testEqual", p));

    p = &CTestComplex2::testUnequal;
    suiteOfTests->addTest(new CppUnit::TestCaller<CTestComplex2>("testUnequal", p));
    return suiteOfTests;
}
コード例 #7
0
CppUnit::Test* FilesystemTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("FilesystemTestSuite");

	pSuite->addTest(PathTest::suite());
	pSuite->addTest(FileTest::suite());
	pSuite->addTest(GlobTest::suite());
#ifndef POCO_NO_INOTIFY
	pSuite->addTest(DirectoryWatcherTest::suite());
#endif // POCO_NO_INOTIFY
	pSuite->addTest(DirectoryIteratorsTest::suite());
	
	return pSuite;
}
コード例 #8
0
// Suite
CppUnit::Test*
MimeSnifferTest::Suite() {
    CppUnit::TestSuite *suite = new CppUnit::TestSuite();
    typedef CppUnit::TestCaller<MimeSnifferTest> TC;

    suite->addTest( new TC("Mime Sniffer::Scanner Test",
                           &MimeSnifferTest::ScannerTest) );
    suite->addTest( new TC("Mime Sniffer::Parser Test",
                           &MimeSnifferTest::ParserTest) );
    suite->addTest( new TC("Mime Sniffer::Sniffer Test",
                           &MimeSnifferTest::SnifferTest) );

    return suite;
}
コード例 #9
0
ファイル: AgentTest.cpp プロジェクト: mransan/maxmm
CppUnit::TestSuite *AgentTest::getSuite(void)
{
     CppUnit::TestSuite          *suite = new CppUnit::TestSuite();
     suite->addTest(
        new CppUnit::TestCaller<AgentTest>(
            "AgentTest::test_constructor",
            &AgentTest::test_constructor));
    
    suite->addTest(
        new CppUnit::TestCaller<AgentTest>(
            "AgentTest::test_accessors",
            &AgentTest::test_accessors));

    return suite;
}
コード例 #10
0
CppUnit::Test* TestSpinNetworkStep::suite()
{
    CppUnit::TestSuite *suiteOfTests = new CppUnit::TestSuite("TestSpinNetworkStep");
    
    suiteOfTests->addTest( new CppUnit::TestCaller<TestSpinNetworkStep>("TestSpinNetworkStep: test_get_flip_index", &TestSpinNetworkStep::test_get_flip_index ) );
    suiteOfTests->addTest( new CppUnit::TestCaller<TestSpinNetworkStep>("TestSpinNetworkStep: test_get_old_spin", &TestSpinNetworkStep::test_get_old_spin ) );
    suiteOfTests->addTest( new CppUnit::TestCaller<TestSpinNetworkStep>("TestSpinNetworkStep: test_get_new_spin", &TestSpinNetworkStep::test_get_new_spin ) );
    suiteOfTests->addTest( new CppUnit::TestCaller<TestSpinNetworkStep>("TestSpinNetworkStep: test_get_creation_simulation_time", &TestSpinNetworkStep::test_get_creation_simulation_time ) );

    suiteOfTests->addTest( new CppUnit::TestCaller<TestSpinNetworkStep>("TestSpinNetworkStep: test_delta_E", &TestSpinNetworkStep::test_delta_E ) );
    suiteOfTests->addTest( new CppUnit::TestCaller<TestSpinNetworkStep>("TestSpinNetworkStep: test_execute", &TestSpinNetworkStep::test_execute ) );
    suiteOfTests->addTest( new CppUnit::TestCaller<TestSpinNetworkStep>("TestSpinNetworkStep: test_undo", &TestSpinNetworkStep::test_undo ) );

    return suiteOfTests;
}
コード例 #11
0
ファイル: IntervalTest.hpp プロジェクト: Brainiarc7/TS
 static CppUnit::Test *suite()
 {
     CppUnit::TestSuite *suiteOfTests = new CppUnit::TestSuite("IntervalTest");
     suiteOfTests->addTest(new CppUnit::TestCaller<IntervalTest>("testGeneral",
             &IntervalTest::testGeneral));
     suiteOfTests->addTest(new CppUnit::TestCaller<IntervalTest>("testBisect",
             &IntervalTest::testBisect));
     suiteOfTests->addTest(new CppUnit::TestCaller<IntervalTest>("testAbuts",
             &IntervalTest::testAbuts));
     suiteOfTests->addTest(new CppUnit::TestCaller<IntervalTest>("testIntersect",
             &IntervalTest::testIntersect));
     suiteOfTests->addTest(new CppUnit::TestCaller<IntervalTest>("testParse",
             &IntervalTest::testParse));
     return suiteOfTests;
 }
コード例 #12
0
ファイル: test3.cpp プロジェクト: Whitestar/vmath
	static CppUnit::Test* suite()
	{
		CppUnit::TestSuite* suite = new CppUnit::TestSuite("Matrix3f test");
		suite->addTest(new CppUnit::TestCaller<Matrix3fTest>("multiplication",
				&Matrix3fTest::testMultiplication));
		suite->addTest(new CppUnit::TestCaller<Matrix3fTest>("determinant",
				&Matrix3fTest::testDeterminant));
		suite->addTest(new CppUnit::TestCaller<Matrix3fTest>("inversion",
				&Matrix3fTest::testInversion));

		//testFromColumnOrRowMajorArray
		suite->addTest(new CppUnit::TestCaller<Matrix3fTest>("from column or row major array",
				&Matrix3fTest::testFromColumnOrRowMajorArray));

		return suite;
	}
コード例 #13
0
ファイル: ConcurrencyTest1.cpp プロジェクト: mariuz/haiku
CppUnit::Test *ConcurrencyTest1::suite(void)
{	
	typedef BThreadedTestCaller<ConcurrencyTest1>
		ConcurrencyTest1Caller;


	CppUnit::TestSuite *testSuite = new CppUnit::TestSuite("ConcurrencyTest1");
	
	// Make a benaphore based test object, create a ThreadedTestCase for it and add
	// three threads to it.
	ConcurrencyTest1 *theTest = new ConcurrencyTest1("Benaphore", true);
	ConcurrencyTest1Caller *threadedTest1 = new ConcurrencyTest1Caller("BLocker::Concurrency Test #1 (benaphore)", theTest);
	threadedTest1->addThread("A", &ConcurrencyTest1::TestThread);
	threadedTest1->addThread("B", &ConcurrencyTest1::TestThread);
	threadedTest1->addThread("C", &ConcurrencyTest1::TestThread);
				
	// Make a semaphore based test object, create a ThreadedTestCase for it and add
	// three threads to it.					 		
	theTest = new ConcurrencyTest1("Semaphore", false);
	ConcurrencyTest1Caller *threadedTest2 = new ConcurrencyTest1Caller("BLocker::Concurrency Test #1 (semaphore)", theTest);
	threadedTest2->addThread("A", &ConcurrencyTest1::TestThread);
	threadedTest2->addThread("B", &ConcurrencyTest1::TestThread);
	threadedTest2->addThread("C", &ConcurrencyTest1::TestThread);
									 		
	testSuite->addTest(threadedTest1);	
	testSuite->addTest(threadedTest2);
	return(testSuite);
	}
コード例 #14
0
CppUnit::Test* LoggingUnitTest::suite() {
    CppUnit::TestSuite *testSuite = new CppUnit::TestSuite("LoggingUnitTest");

    testSuite->addTest(new CppUnit::TestCaller<LoggingUnitTest>("checkDefaultStatusTest", &LoggingUnitTest::checkDefaultStatusTest));

    return testSuite;
}
コード例 #15
0
ファイル: JSONTestSuite.cpp プロジェクト: austinsc/Poco
CppUnit::Test* JSONTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("JSONTestSuite");

	pSuite->addTest(JSONTest::suite());

	return pSuite;
}
コード例 #16
0
CppUnit::Test * pop_monteTest::suite()
{
  CppUnit::TestSuite *suiteOfTests = new CppUnit::TestSuite( "pop_monteTest"  );
  suiteOfTests->addTest( 
     new CppUnit::TestCaller<pop_monteTest>(
         "testMontePars_h", 
	 &pop_monteTest::testMontePars_h ) );
  suiteOfTests->addTest( 
     new CppUnit::TestCaller<pop_monteTest>(
         "testDriver", 
	 &pop_monteTest::testDriver ) );
  suiteOfTests->addTest( 
     new CppUnit::TestCaller<pop_monteTest>(
         "testReportML", 
	 &pop_monteTest::testReportML ) );
  return suiteOfTests;
}
コード例 #17
0
ファイル: HTMLTestSuite.cpp プロジェクト: 119/vdc
CppUnit::Test* HTMLTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("HTMLTestSuite");

	pSuite->addTest(HTMLFormTest::suite());

	return pSuite;
}
コード例 #18
0
CppUnit::Test* SocketTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("SocketTestSuite");

	pSuite->addTest(SocketChannelTest::suite());

	return pSuite;
}
コード例 #19
0
ファイル: ProtocolTestSuite.cpp プロジェクト: hadzim/fit-mbot
CppUnit::Test* ProtocolTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ProtocolTestSuite");

	pSuite->addTest(ProtocolTest::suite());

	return pSuite;
}
コード例 #20
0
ファイル: HTTPServerTestSuite.cpp プロジェクト: 119/vdc
CppUnit::Test* HTTPServerTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("HTTPServerTestSuite");

	pSuite->addTest(HTTPServerTest::suite());

	return pSuite;
}
コード例 #21
0
CppUnit::Test* ICMPClientTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ICMPClientTestSuite");

	pSuite->addTest(ICMPClientTest::suite());

	return pSuite;
}
コード例 #22
0
ファイル: ThreadingTestSuite.cpp プロジェクト: as2120/ZPoco
CppUnit::Test* ThreadingTestSuite::suite()
{
    CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ThreadingTestSuite");

    pSuite->addTest(ThreadTest::suite());
    pSuite->addTest(SemaphoreTest::suite());
    pSuite->addTest(RWLockTest::suite());
    pSuite->addTest(ThreadPoolTest::suite());
    pSuite->addTest(TimerTest::suite());
    pSuite->addTest(ThreadLocalTest::suite());
    pSuite->addTest(ActivityTest::suite());
    pSuite->addTest(ActiveMethodTest::suite());
    pSuite->addTest(ActiveDispatcherTest::suite());
    pSuite->addTest(ConditionTest::suite());

    return pSuite;
}
コード例 #23
0
CppUnit::Test* DevicesTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("DevicesTestSuite");

	pSuite->addTest(EventModerationPolicyTest::suite());

	return pSuite;
}
コード例 #24
0
CppUnit::Test* SQLiteTestSuite::suite()
{
    CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("SQLiteTestSuite");

    pSuite->addTest(SQLiteTest::suite());

    return pSuite;
}
コード例 #25
0
CppUnit::Test* TestSpinLatticeTriangular2d::suite()
{
    CppUnit::TestSuite *suiteOfTests = new CppUnit::TestSuite("TestSpinLatticeTriangular2d");
    
    suiteOfTests->addTest( new CppUnit::TestCaller<TestSpinLatticeTriangular2d>("TestSpinLatticeTriangular2d: test_delta_E_automatically", &TestSpinLatticeTriangular2d::test_delta_E_automatically ) );

    return suiteOfTests;
}
コード例 #26
0
CppUnit::Test* CANDevicesTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("CANDevicesTestSuite");

	pSuite->addTest(BitStreamTest::suite());

	return pSuite;
}
コード例 #27
0
CppUnit::Test* AsyncIOTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("AsyncIOTestSuite");

	pSuite->addTest(AsyncIOChannelTest::suite());

	return pSuite;
}
コード例 #28
0
CppUnit::Test* SerialTestSWSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("SerialTestSuite");

	pSuite->addTest(SerialTestSW::suite());

	return pSuite;
}
コード例 #29
0
CppUnit::Test* OSPCoreTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("OSPCoreTestSuite");

	pSuite->addTest(VersionTest::suite());

	return pSuite;
}
コード例 #30
0
CppUnit::Test* CodeGenerationTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("CodeGenerationTestSuite");

	pSuite->addTest(CodeGenerationTest::suite());

	return pSuite;
}