X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDRO_tests%2Ftest_HYDROData_Main.cxx;h=151bb2b561eaefb87d4793b2e15ae7fc9cc2a2d1;hb=f709724a7a412254db7ee6ca094b01b6dc75e82b;hp=66fcdafc3fee9f735325afc6ae630f190ed154f7;hpb=eb96d4bbe84d0fdd43ebd9e098f6ba12df38bcb9;p=modules%2Fhydro.git diff --git a/src/HYDRO_tests/test_HYDROData_Main.cxx b/src/HYDRO_tests/test_HYDROData_Main.cxx index 66fcdafc..151bb2b5 100644 --- a/src/HYDRO_tests/test_HYDROData_Main.cxx +++ b/src/HYDRO_tests/test_HYDROData_Main.cxx @@ -20,31 +20,19 @@ #include #include #include -#include -#include #include #include +#include +#include #include #include #include #include - -std::ostream& operator<<( std::ostream& theStream, const QString& theText ) -{ - theStream << theText.toStdString(); - return theStream; -} - -std::ostream& operator<<( std::ostream& theStream, const QColor& theColor ) -{ - theStream << "[" << theColor.red() << ", " << theColor.green() << ", " << theColor.blue() << "]"; - return theStream; -} #include int main( int argc, char* argv[] ) { - srand( time( 0 ) ); + srand( 0 ); QApplication anApp( argc, argv ); SUIT_Session aSession; @@ -63,18 +51,20 @@ int main( int argc, char* argv[] ) controller.addListener( &result ); // Add a listener that print dots as test run. - CppUnit::TextTestProgressListener progress; + TestLib_Listener progress; controller.addListener( &progress ); CppUnit::TestFactoryRegistry& registry = CppUnit::TestFactoryRegistry::getRegistry(); // Add the top suite to the test runner - CppUnit::TestRunner runner; + TestLib_Runner runner; + QString aPath = qgetenv( "HYDRO_SRC_DIR" ) + "/src/tests.cfg"; + runner.Load( aPath.toStdString() ); runner.addTest( registry.makeTest() ); try { - std::cout << "Running " << testPath; - runner.run( controller, testPath ); + std::cout << "Running tests " << testPath << "..." << std::endl; + runner.Run( controller ); std::cerr << std::endl;