Esempio n. 1
0
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;
}
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;
}
Esempio n. 3
0
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;
}
Esempio n. 4
0
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;
}
Esempio n. 5
0
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;
}
Esempio n. 6
0
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;
}
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;
}
Esempio n. 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;
}
Esempio n. 9
0
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;
}
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;
}
Esempio n. 11
0
 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;
 }
Esempio n. 12
0
	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;
	}
Esempio n. 13
0
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);
	}
Esempio n. 14
0
CppUnit::Test* LoggingUnitTest::suite() {
    CppUnit::TestSuite *testSuite = new CppUnit::TestSuite("LoggingUnitTest");

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

    return testSuite;
}
Esempio n. 15
0
CppUnit::Test* JSONTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("JSONTestSuite");

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

	return pSuite;
}
Esempio n. 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;
}
Esempio n. 17
0
CppUnit::Test* HTMLTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("HTMLTestSuite");

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

	return pSuite;
}
Esempio n. 18
0
CppUnit::Test* SocketTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("SocketTestSuite");

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

	return pSuite;
}
Esempio n. 19
0
CppUnit::Test* ProtocolTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ProtocolTestSuite");

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

	return pSuite;
}
Esempio n. 20
0
CppUnit::Test* HTTPServerTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("HTTPServerTestSuite");

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

	return pSuite;
}
Esempio n. 21
0
CppUnit::Test* ICMPClientTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ICMPClientTestSuite");

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

	return pSuite;
}
Esempio n. 22
0
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;
}
Esempio n. 23
0
CppUnit::Test* DevicesTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("DevicesTestSuite");

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

	return pSuite;
}
Esempio n. 24
0
CppUnit::Test* SQLiteTestSuite::suite()
{
    CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("SQLiteTestSuite");

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

    return pSuite;
}
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;
}
Esempio n. 26
0
CppUnit::Test* CANDevicesTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("CANDevicesTestSuite");

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

	return pSuite;
}
Esempio n. 27
0
CppUnit::Test* AsyncIOTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("AsyncIOTestSuite");

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

	return pSuite;
}
Esempio n. 28
0
CppUnit::Test* SerialTestSWSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("SerialTestSuite");

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

	return pSuite;
}
CppUnit::Test* OSPCoreTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("OSPCoreTestSuite");

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

	return pSuite;
}
CppUnit::Test* CodeGenerationTestSuite::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("CodeGenerationTestSuite");

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

	return pSuite;
}