- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/unittests/gslvectorunittest.cpp ¶
rb11d3b rbf3817 5 5 * Author: heber 6 6 */ 7 8 // include config.h 9 #ifdef HAVE_CONFIG_H 10 #include <config.h> 11 #endif 7 12 8 13 using namespace std; … … 13 18 14 19 #include "gslvectorunittest.hpp" 20 21 #ifdef HAVE_TESTRUNNER 22 #include "UnitTestMain.hpp" 23 #endif /*HAVE_TESTRUNNER*/ 15 24 16 25 /********************************************** Test classes **************************************/ … … 114 123 }; 115 124 116 117 125 /** UnitTest for operators. 118 126 */ … … 160 168 CPPUNIT_ASSERT_EQUAL( true, unit.IsOne() ); 161 169 }; 162 163 /********************************************** Main routine **************************************/164 165 int main(int argc, char **argv)166 {167 // Get the top level suite from the registry168 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();169 170 // Adds the test to the list of test to run171 CppUnit::TextUi::TestRunner runner;172 runner.addTest( suite );173 174 // Change the default outputter to a compiler error format outputter175 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),176 std::cerr ) );177 // Run the tests.178 bool wasSucessful = runner.run();179 180 // Return error code 1 if the one of test failed.181 return wasSucessful ? 0 : 1;182 };
Note:
See TracChangeset
for help on using the changeset viewer.