- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/unittests/gslvectorunittest.cpp
rb11d3b rbcf653 1 /* 2 * Project: MoleCuilder 3 * Description: creates and alters molecular systems 4 * Copyright (C) 2010 University of Bonn. All rights reserved. 5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details. 6 */ 7 1 8 /* 2 9 * gslvectorunittest.cpp … … 5 12 * Author: heber 6 13 */ 14 15 // include config.h 16 #ifdef HAVE_CONFIG_H 17 #include <config.h> 18 #endif 7 19 8 20 using namespace std; … … 13 25 14 26 #include "gslvectorunittest.hpp" 27 28 #ifdef HAVE_TESTRUNNER 29 #include "UnitTestMain.hpp" 30 #endif /*HAVE_TESTRUNNER*/ 15 31 16 32 /********************************************** Test classes **************************************/ … … 114 130 }; 115 131 116 117 132 /** UnitTest for operators. 118 133 */ … … 160 175 CPPUNIT_ASSERT_EQUAL( true, unit.IsOne() ); 161 176 }; 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.