Changeset 9b6b2f
- Timestamp:
- Feb 25, 2010, 2:17:15 PM (15 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- c296c2, cee0a17
- Parents:
- 685100
- Files:
-
- 2 added
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
configure.ac
r685100 r9b6b2f 66 66 fi 67 67 68 # add replacement/saturation hydrogen or not 69 AC_ARG_ENABLE([ecut],AS_HELP_STRING([--enable-ecut],[Use ECut TestRunnerClient (default is yes)]), 70 [enable_ecut=$enableval], [enable_ecut=yes]) 71 if test x"$enable_ecut" = xyes; then 72 AC_DEFINE(HAVE_ECUT,1, ["Use ECut TestRunnerClient instead of our own."]) 73 AC_SUBST(HAVE_ECUT) 74 fi 75 68 76 # Check for "extern inline", using a modified version 69 77 # of the test for AC_C_INLINE from acspecific.mt -
src/unittests/ActOnAllUnitTest.cpp
r685100 r9b6b2f 16 16 #include "memoryallocator.hpp" 17 17 #include "vector.hpp" 18 19 #ifdef HAVE_TESTRUNNER 20 #include "UnitTestMain.hpp" 21 #endif /*HAVE_TESTRUNNER*/ 18 22 19 23 /********************************************** Test classes **************************************/ … … 108 112 } 109 113 }; 110 111 112 /********************************************** Main routine **************************************/113 114 int main(int argc, char **argv)115 {116 // Get the top level suite from the registry117 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();118 119 // Adds the test to the list of test to run120 CppUnit::TextUi::TestRunner runner;121 runner.addTest( suite );122 123 // Change the default outputter to a compiler error format outputter124 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),125 std::cerr ) );126 // Run the tests.127 bool wasSucessful = runner.run();128 129 // Return error code 1 if the one of test failed.130 return wasSucessful ? 0 : 1;131 }; -
src/unittests/ActionSequenceTest.cpp
r685100 r9b6b2f 13 13 #include "Actions/Action.hpp" 14 14 #include "Actions/ActionSequence.hpp" 15 16 #ifdef HAVE_TESTRUNNER 17 #include "UnitTestMain.hpp" 18 #endif /*HAVE_TESTRUNNER*/ 19 20 /********************************************** Test classes **************************************/ 15 21 16 22 // Registers the fixture into the 'registry' … … 193 199 194 200 195 /********************************************** Main routine **************************************/196 197 int main(int argc, char **argv)198 {199 // Get the top level suite from the registry200 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();201 202 // Adds the test to the list of test to run203 CppUnit::TextUi::TestRunner runner;204 runner.addTest( suite );205 206 // Change the default outputter to a compiler error format outputter207 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),208 std::cerr ) );209 // Run the tests.210 bool wasSucessful = runner.run();211 212 // Return error code 1 if the one of test failed.213 return wasSucessful ? 0 : 1;214 }; -
src/unittests/AnalysisCorrelationToPointUnitTest.cpp
r685100 r9b6b2f 24 24 #include "periodentafel.hpp" 25 25 #include "tesselation.hpp" 26 27 #ifdef HAVE_TESTRUNNER 28 #include "UnitTestMain.hpp" 29 #endif /*HAVE_TESTRUNNER*/ 26 30 27 31 /********************************************** Test classes **************************************/ … … 140 144 141 145 }; 142 143 /********************************************** Main routine **************************************/144 145 int main(int argc, char **argv)146 {147 // Get the top level suite from the registry148 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();149 150 // Adds the test to the list of test to run151 CppUnit::TextUi::TestRunner runner;152 runner.addTest( suite );153 154 // Change the default outputter to a compiler error format outputter155 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),156 std::cerr ) );157 // Run the tests.158 bool wasSucessful = runner.run();159 160 // Return error code 1 if the one of test failed.161 return wasSucessful ? 0 : 1;162 }; -
src/unittests/AnalysisCorrelationToSurfaceUnitTest.cpp
r685100 r9b6b2f 24 24 #include "periodentafel.hpp" 25 25 #include "tesselation.hpp" 26 27 #ifdef HAVE_TESTRUNNER 28 #include "UnitTestMain.hpp" 29 #endif /*HAVE_TESTRUNNER*/ 26 30 27 31 /********************************************** Test classes **************************************/ … … 211 215 212 216 }; 213 214 /********************************************** Main routine **************************************/215 216 int main(int argc, char **argv)217 {218 // Get the top level suite from the registry219 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();220 221 // Adds the test to the list of test to run222 CppUnit::TextUi::TestRunner runner;223 runner.addTest( suite );224 225 // Change the default outputter to a compiler error format outputter226 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),227 std::cerr ) );228 // Run the tests.229 bool wasSucessful = runner.run();230 231 // Return error code 1 if the one of test failed.232 return wasSucessful ? 0 : 1;233 }; -
src/unittests/AnalysisPairCorrelationUnitTest.cpp
r685100 r9b6b2f 24 24 #include "periodentafel.hpp" 25 25 #include "tesselation.hpp" 26 27 #ifdef HAVE_TESTRUNNER 28 #include "UnitTestMain.hpp" 29 #endif /*HAVE_TESTRUNNER*/ 26 30 27 31 /********************************************** Test classes **************************************/ … … 132 136 CPPUNIT_ASSERT_EQUAL( 6, tester->second ); 133 137 }; 134 135 /********************************************** Main routine **************************************/136 137 int main(int argc, char **argv)138 {139 // Get the top level suite from the registry140 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();141 142 // Adds the test to the list of test to run143 CppUnit::TextUi::TestRunner runner;144 runner.addTest( suite );145 146 // Change the default outputter to a compiler error format outputter147 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),148 std::cerr ) );149 // Run the tests.150 bool wasSucessful = runner.run();151 152 // Return error code 1 if the one of test failed.153 return wasSucessful ? 0 : 1;154 }; -
src/unittests/CacheableTest.cpp
r685100 r9b6b2f 15 15 16 16 #include "Patterns/Cacheable.hpp" 17 18 #ifdef HAVE_TESTRUNNER 19 #include "UnitTestMain.hpp" 20 #endif /*HAVE_TESTRUNNER*/ 21 22 /********************************************** Test classes **************************************/ 17 23 18 24 // Registers the fixture into the 'registry' … … 77 83 CPPUNIT_ASSERT_EQUAL( true, numbers->hasRecalced); 78 84 } 79 80 81 82 /********************************************** Main routine **************************************/83 84 int main(int argc, char **argv)85 {86 // Get the top level suite from the registry87 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();88 89 // Adds the test to the list of test to run90 CppUnit::TextUi::TestRunner runner;91 runner.addTest( suite );92 93 // Change the default outputter to a compiler error format outputter94 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),95 std::cerr ) );96 // Run the tests.97 bool wasSucessful = runner.run();98 99 // Return error code 1 if the one of test failed.100 return wasSucessful ? 0 : 1;101 };102 -
src/unittests/DescriptorUnittest.cpp
r685100 r9b6b2f 19 19 #include "atom.hpp" 20 20 21 #ifdef HAVE_TESTRUNNER 22 #include "UnitTestMain.hpp" 23 #endif /*HAVE_TESTRUNNER*/ 24 25 /********************************************** Test classes **************************************/ 21 26 // Registers the fixture into the 'registry' 22 27 CPPUNIT_TEST_SUITE_REGISTRATION( DescriptorUnittest ); … … 157 162 } 158 163 } 159 160 /********************************************** Main routine **************************************/161 162 int main(int argc, char **argv)163 {164 // Get the top level suite from the registry165 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();166 167 // Adds the test to the list of test to run168 CppUnit::TextUi::TestRunner runner;169 runner.addTest( suite );170 171 // Change the default outputter to a compiler error format outputter172 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),173 std::cerr ) );174 // Run the tests.175 bool wasSucessful = runner.run();176 177 // Return error code 1 if the one of test failed.178 return wasSucessful ? 0 : 1;179 }; -
src/unittests/Makefile.am
r685100 r9b6b2f 34 34 35 35 check_PROGRAMS = $(TESTS) 36 noinst_PROGRAMS = $(TESTS) 36 noinst_PROGRAMS = $(TESTS) TestRunner 37 37 38 38 GSLLIBS = ../libgslwrapper.a 39 39 ALLLIBS = ../libmolecuilder.a ${GSLLIBS} $(BOOST_LIB) ${BOOST_THREAD_LIB} 40 40 41 ActOnAllUnitTest_SOURCES = ../test/ActOnAllTest.hpp ActOnAllUnitTest.cpp ActOnAllUnitTest.hpp 41 TESTSOURCES = \ 42 ActOnAllUnitTest.cpp \ 43 analysisbondsunittest.cpp \ 44 AnalysisCorrelationToPointUnitTest.cpp \ 45 AnalysisCorrelationToSurfaceUnitTest.cpp \ 46 AnalysisPairCorrelationUnitTest.cpp \ 47 bondgraphunittest.cpp \ 48 gslmatrixsymmetricunittest.cpp \ 49 gslmatrixunittest.cpp \ 50 gslvectorunittest.cpp \ 51 infounittest.cpp \ 52 linearsystemofequationsunittest.cpp \ 53 listofbondsunittest.cpp \ 54 logunittest.cpp \ 55 memoryallocatorunittest.cpp \ 56 memoryusageobserverunittest.cpp \ 57 stackclassunittest.cpp \ 58 tesselationunittest.cpp \ 59 tesselation_boundarytriangleunittest.cpp \ 60 tesselation_insideoutsideunittest.cpp \ 61 vectorunittest.cpp \ 62 ActionSequenceTest.cpp \ 63 ObserverTest.cpp \ 64 CacheableTest.cpp \ 65 DescriptorUnittest.cpp 66 67 TESTHEADERS = \ 68 analysis_correlation.hpp 69 70 ActOnAllUnitTest_SOURCES = UnitTestMain.cpp ../test/ActOnAllTest.hpp ActOnAllUnitTest.cpp ActOnAllUnitTest.hpp 42 71 ActOnAllUnitTest_LDADD = ${ALLLIBS} 43 72 44 AnalysisBondsUnitTests_SOURCES = analysisbondsunittest.cpp analysisbondsunittest.hpp73 AnalysisBondsUnitTests_SOURCES = UnitTestMain.cpp analysisbondsunittest.cpp analysisbondsunittest.hpp 45 74 AnalysisBondsUnitTests_LDADD = ${ALLLIBS} 46 75 47 AnalysisCorrelationToPointUnitTest_SOURCES = analysis_correlation.hpp AnalysisCorrelationToPointUnitTest.cpp AnalysisCorrelationToPointUnitTest.hpp76 AnalysisCorrelationToPointUnitTest_SOURCES = UnitTestMain.cpp analysis_correlation.hpp AnalysisCorrelationToPointUnitTest.cpp AnalysisCorrelationToPointUnitTest.hpp 48 77 AnalysisCorrelationToPointUnitTest_LDADD = ${ALLLIBS} 49 78 50 AnalysisCorrelationToSurfaceUnitTest_SOURCES = analysis_correlation.hpp AnalysisCorrelationToSurfaceUnitTest.cpp AnalysisCorrelationToSurfaceUnitTest.hpp79 AnalysisCorrelationToSurfaceUnitTest_SOURCES = UnitTestMain.cpp analysis_correlation.hpp AnalysisCorrelationToSurfaceUnitTest.cpp AnalysisCorrelationToSurfaceUnitTest.hpp 51 80 AnalysisCorrelationToSurfaceUnitTest_LDADD = ${ALLLIBS} 52 81 53 AnalysisPairCorrelationUnitTest_SOURCES = analysis_correlation.hpp AnalysisPairCorrelationUnitTest.cpp AnalysisPairCorrelationUnitTest.hpp82 AnalysisPairCorrelationUnitTest_SOURCES = UnitTestMain.cpp analysis_correlation.hpp AnalysisPairCorrelationUnitTest.cpp AnalysisPairCorrelationUnitTest.hpp 54 83 AnalysisPairCorrelationUnitTest_LDADD = ${ALLLIBS} 55 84 56 BondGraphUnitTest_SOURCES = bondgraphunittest.cpp bondgraphunittest.hpp85 BondGraphUnitTest_SOURCES = UnitTestMain.cpp bondgraphunittest.cpp bondgraphunittest.hpp 57 86 BondGraphUnitTest_LDADD = ${ALLLIBS} 58 87 59 GSLMatrixSymmetricUnitTest_SOURCES = gslmatrixsymmetricunittest.cpp gslmatrixsymmetricunittest.hpp88 GSLMatrixSymmetricUnitTest_SOURCES = UnitTestMain.cpp gslmatrixsymmetricunittest.cpp gslmatrixsymmetricunittest.hpp 60 89 GSLMatrixSymmetricUnitTest_LDADD = ${GSLLIBS} 61 90 62 GSLMatrixUnitTest_SOURCES = gslmatrixunittest.cpp gslmatrixunittest.hpp91 GSLMatrixUnitTest_SOURCES = UnitTestMain.cpp gslmatrixunittest.cpp gslmatrixunittest.hpp 63 92 GSLMatrixUnitTest_LDADD = ${GSLLIBS} 64 93 65 GSLVectorUnitTest_SOURCES = gslvectorunittest.cpp gslvectorunittest.hpp94 GSLVectorUnitTest_SOURCES = UnitTestMain.cpp gslvectorunittest.cpp gslvectorunittest.hpp 66 95 GSLVectorUnitTest_LDADD = ${GSLLIBS} 67 96 68 InfoUnitTest_SOURCES = infounittest.cpp infounittest.hpp97 InfoUnitTest_SOURCES = UnitTestMain.cpp infounittest.cpp infounittest.hpp 69 98 InfoUnitTest_LDADD = ${ALLLIBS} 70 99 71 LinearSystemOfEquationsUnitTest_SOURCES = linearsystemofequationsunittest.cpp linearsystemofequationsunittest.hpp100 LinearSystemOfEquationsUnitTest_SOURCES = UnitTestMain.cpp linearsystemofequationsunittest.cpp linearsystemofequationsunittest.hpp 72 101 LinearSystemOfEquationsUnitTest_LDADD = ${ALLLIBS} 73 102 74 ListOfBondsUnitTest_SOURCES = listofbondsunittest.cpp listofbondsunittest.hpp103 ListOfBondsUnitTest_SOURCES = UnitTestMain.cpp listofbondsunittest.cpp listofbondsunittest.hpp 75 104 ListOfBondsUnitTest_LDADD = ${ALLLIBS} 76 105 77 LogUnitTest_SOURCES = logunittest.cpp logunittest.hpp106 LogUnitTest_SOURCES = UnitTestMain.cpp logunittest.cpp logunittest.hpp 78 107 LogUnitTest_LDADD = ${ALLLIBS} 79 108 80 MemoryAllocatorUnitTest_SOURCES = memoryallocatorunittest.cpp memoryallocatorunittest.hpp109 MemoryAllocatorUnitTest_SOURCES = UnitTestMain.cpp memoryallocatorunittest.cpp memoryallocatorunittest.hpp 81 110 MemoryAllocatorUnitTest_LDADD = ${ALLLIBS} 82 111 83 MemoryUsageObserverUnitTest_SOURCES = memoryusageobserverunittest.cpp memoryusageobserverunittest.hpp112 MemoryUsageObserverUnitTest_SOURCES = UnitTestMain.cpp memoryusageobserverunittest.cpp memoryusageobserverunittest.hpp 84 113 MemoryUsageObserverUnitTest_LDADD = ${ALLLIBS} 85 114 86 StackClassUnitTest_SOURCES = stackclassunittest.cpp stackclassunittest.hpp115 StackClassUnitTest_SOURCES = UnitTestMain.cpp stackclassunittest.cpp stackclassunittest.hpp 87 116 StackClassUnitTest_LDADD = ${ALLLIBS} 88 117 89 TesselationUnitTest_SOURCES = tesselationunittest.cpp tesselationunittest.hpp118 TesselationUnitTest_SOURCES = UnitTestMain.cpp tesselationunittest.cpp tesselationunittest.hpp 90 119 TesselationUnitTest_LDADD = ${ALLLIBS} 91 120 92 Tesselation_BoundaryTriangleUnitTest_SOURCES = tesselation_boundarytriangleunittest.cpp tesselation_boundarytriangleunittest.hpp121 Tesselation_BoundaryTriangleUnitTest_SOURCES = UnitTestMain.cpp tesselation_boundarytriangleunittest.cpp tesselation_boundarytriangleunittest.hpp 93 122 Tesselation_BoundaryTriangleUnitTest_LDADD = ${ALLLIBS} 94 123 95 Tesselation_InOutsideUnitTest_SOURCES = tesselation_insideoutsideunittest.cpp tesselation_insideoutsideunittest.hpp124 Tesselation_InOutsideUnitTest_SOURCES = UnitTestMain.cpp tesselation_insideoutsideunittest.cpp tesselation_insideoutsideunittest.hpp 96 125 Tesselation_InOutsideUnitTest_LDADD = ${ALLLIBS} 97 126 98 VectorUnitTest_SOURCES = vectorunittest.cpp vectorunittest.hpp127 VectorUnitTest_SOURCES = UnitTestMain.cpp vectorunittest.cpp vectorunittest.hpp 99 128 VectorUnitTest_LDADD = ${ALLLIBS} 100 129 101 ActionSequenceTest_SOURCES = ActionSequenceTest.cpp ActionSequenceTest.hpp130 ActionSequenceTest_SOURCES = UnitTestMain.cpp ../../../TestRunnerClient.hpp ActionSequenceTest.cpp ActionSequenceTest.hpp 102 131 ActionSequenceTest_LDADD = ${ALLLIBS} 103 132 104 ObserverTest_SOURCES = ObserverTest.cpp ObserverTest.hpp133 ObserverTest_SOURCES = UnitTestMain.cpp ObserverTest.cpp ObserverTest.hpp 105 134 ObserverTest_LDADD = ${ALLLIBS} 106 135 107 CacheableTest_SOURCES = CacheableTest.cpp CacheableTest.hpp136 CacheableTest_SOURCES = UnitTestMain.cpp CacheableTest.cpp CacheableTest.hpp 108 137 CacheableTest_LDADD = ${ALLLIBS} 109 138 110 DescriptorUnittest_SOURCES = DescriptorUnittest.cpp DescriptorUnittest.hpp 111 DescriptorUnittest_LDADD = ${ALLLIBS} 139 DescriptorUnittest_SOURCES = UnitTestMain.cpp DescriptorUnittest.cpp DescriptorUnittest.hpp 140 DescriptorUnittest_LDADD = ${ALLLIBS} 141 142 TestRunner_SOURCES = TestRunnerMain.cpp $(TESTSOURCES) $(TESTHEADERS) 143 TestRunner_LDADD = ${ALLLIBS} 112 144 113 145 #AUTOMAKE_OPTIONS = parallel-tests -
src/unittests/ObserverTest.cpp
r685100 r9b6b2f 17 17 18 18 using namespace std; 19 20 #ifdef HAVE_TESTRUNNER 21 #include "UnitTestMain.hpp" 22 #endif /*HAVE_TESTRUNNER*/ 19 23 20 24 // Registers the fixture into the 'registry' … … 110 114 simpleObservable1->signOn(observer2); 111 115 simpleObservable1->signOn(observer3); 116 112 117 simpleObservable2->signOn(observer2); 113 118 simpleObservable2->signOn(observer4); … … 181 186 CPPUNIT_ASSERT(true); 182 187 } 183 184 /********************************************** Main routine **************************************/185 186 int main(int argc, char **argv)187 {188 // Get the top level suite from the registry189 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();190 191 // Adds the test to the list of test to run192 CppUnit::TextUi::TestRunner runner;193 runner.addTest( suite );194 195 // Change the default outputter to a compiler error format outputter196 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),197 std::cerr ) );198 // Run the tests.199 bool wasSucessful = runner.run();200 201 // Return error code 1 if the one of test failed.202 return wasSucessful ? 0 : 1;203 }; -
src/unittests/analysisbondsunittest.cpp
r685100 r9b6b2f 24 24 #include "molecule.hpp" 25 25 #include "periodentafel.hpp" 26 27 #ifdef HAVE_TESTRUNNER 28 #include "UnitTestMain.hpp" 29 #endif /*HAVE_TESTRUNNER*/ 26 30 27 31 /********************************************** Test classes **************************************/ … … 163 167 CPPUNIT_ASSERT_EQUAL( 0. , Max ); 164 168 }; 165 166 167 /********************************************** Main routine **************************************/168 169 int main(int argc, char **argv)170 {171 // Get the top level suite from the registry172 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();173 174 // Adds the test to the list of test to run175 CppUnit::TextUi::TestRunner runner;176 runner.addTest( suite );177 178 // Change the default outputter to a compiler error format outputter179 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),180 std::cerr ) );181 // Run the tests.182 bool wasSucessful = runner.run();183 184 // Return error code 1 if the one of test failed.185 return wasSucessful ? 0 : 1;186 }; -
src/unittests/bondgraphunittest.cpp
r685100 r9b6b2f 23 23 #include "periodentafel.hpp" 24 24 #include "bondgraphunittest.hpp" 25 26 #ifdef HAVE_TESTRUNNER 27 #include "UnitTestMain.hpp" 28 #endif /*HAVE_TESTRUNNER*/ 25 29 26 30 /********************************************** Test classes **************************************/ … … 123 127 CPPUNIT_ASSERT_EQUAL( true , Walker->IsBondedTo(Runner) ); 124 128 }; 125 126 127 /********************************************** Main routine **************************************/128 129 int main(int argc, char **argv)130 {131 // Get the top level suite from the registry132 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();133 134 // Adds the test to the list of test to run135 CppUnit::TextUi::TestRunner runner;136 runner.addTest( suite );137 138 // Change the default outputter to a compiler error format outputter139 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),140 std::cerr ) );141 // Run the tests.142 bool wasSucessful = runner.run();143 144 // Return error code 1 if the one of test failed.145 return wasSucessful ? 0 : 1;146 }; -
src/unittests/gslmatrixsymmetricunittest.cpp
r685100 r9b6b2f 13 13 14 14 #include "gslmatrixsymmetricunittest.hpp" 15 16 #ifdef HAVE_TESTRUNNER 17 #include "UnitTestMain.hpp" 18 #endif /*HAVE_TESTRUNNER*/ 15 19 16 20 /********************************************** Test classes **************************************/ … … 266 270 CPPUNIT_ASSERT_EQUAL( -26.5, m->Determinant() ); 267 271 }; 268 269 /********************************************** Main routine **************************************/270 271 int main(int argc, char **argv)272 {273 // Get the top level suite from the registry274 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();275 276 // Adds the test to the list of test to run277 CppUnit::TextUi::TestRunner runner;278 runner.addTest( suite );279 280 // Change the default outputter to a compiler error format outputter281 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),282 std::cerr ) );283 // Run the tests.284 bool wasSucessful = runner.run();285 286 // Return error code 1 if the one of test failed.287 return wasSucessful ? 0 : 1;288 }; -
src/unittests/gslmatrixunittest.cpp
r685100 r9b6b2f 13 13 14 14 #include "gslmatrixunittest.hpp" 15 16 #ifdef HAVE_TESTRUNNER 17 #include "UnitTestMain.hpp" 18 #endif /*HAVE_TESTRUNNER*/ 15 19 16 20 /********************************************** Test classes **************************************/ … … 248 252 CPPUNIT_ASSERT_EQUAL( false, m->IsPositiveDefinite() ); 249 253 }; 250 251 /********************************************** Main routine **************************************/252 253 int main(int argc, char **argv)254 {255 // Get the top level suite from the registry256 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();257 258 // Adds the test to the list of test to run259 CppUnit::TextUi::TestRunner runner;260 runner.addTest( suite );261 262 // Change the default outputter to a compiler error format outputter263 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),264 std::cerr ) );265 // Run the tests.266 bool wasSucessful = runner.run();267 268 // Return error code 1 if the one of test failed.269 return wasSucessful ? 0 : 1;270 }; -
src/unittests/gslvectorunittest.cpp
r685100 r9b6b2f 13 13 14 14 #include "gslvectorunittest.hpp" 15 16 #ifdef HAVE_TESTRUNNER 17 #include "UnitTestMain.hpp" 18 #endif /*HAVE_TESTRUNNER*/ 15 19 16 20 /********************************************** Test classes **************************************/ … … 113 117 CPPUNIT_ASSERT_EQUAL( (double)(3-j), v->Get(j) ); 114 118 }; 115 116 117 /********************************************** Main routine **************************************/118 119 int main(int argc, char **argv)120 {121 // Get the top level suite from the registry122 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();123 124 // Adds the test to the list of test to run125 CppUnit::TextUi::TestRunner runner;126 runner.addTest( suite );127 128 // Change the default outputter to a compiler error format outputter129 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),130 std::cerr ) );131 // Run the tests.132 bool wasSucessful = runner.run();133 134 // Return error code 1 if the one of test failed.135 return wasSucessful ? 0 : 1;136 }; -
src/unittests/infounittest.cpp
r685100 r9b6b2f 17 17 #include "info.hpp" 18 18 #include "infounittest.hpp" 19 20 #ifdef HAVE_TESTRUNNER 21 #include "UnitTestMain.hpp" 22 #endif /*HAVE_TESTRUNNER*/ 19 23 20 24 /********************************************** Test classes **************************************/ … … 43 47 CPPUNIT_ASSERT_EQUAL( 1, test.verbosity ); 44 48 }; 45 46 47 /********************************************** Main routine **************************************/48 49 int main(int argc, char **argv)50 {51 // Get the top level suite from the registry52 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();53 54 // Adds the test to the list of test to run55 CppUnit::TextUi::TestRunner runner;56 runner.addTest( suite );57 58 // Change the default outputter to a compiler error format outputter59 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),60 std::cerr ) );61 // Run the tests.62 bool wasSucessful = runner.run();63 64 // Return error code 1 if the one of test failed.65 return wasSucessful ? 0 : 1;66 }; -
src/unittests/linearsystemofequationsunittest.cpp
r685100 r9b6b2f 15 15 #include "linearsystemofequationsunittest.hpp" 16 16 #include "vector.hpp" 17 18 #ifdef HAVE_TESTRUNNER 19 #include "UnitTestMain.hpp" 20 #endif /*HAVE_TESTRUNNER*/ 17 21 18 22 /********************************************** Test classes **************************************/ … … 103 107 delete[](array); 104 108 }; 105 106 /********************************************** Main routine **************************************/107 108 int main(int argc, char **argv)109 {110 // Get the top level suite from the registry111 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();112 113 // Adds the test to the list of test to run114 CppUnit::TextUi::TestRunner runner;115 runner.addTest( suite );116 117 // Change the default outputter to a compiler error format outputter118 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),119 std::cerr ) );120 // Run the tests.121 bool wasSucessful = runner.run();122 123 // Return error code 1 if the one of test failed.124 return wasSucessful ? 0 : 1;125 }; -
src/unittests/listofbondsunittest.cpp
r685100 r9b6b2f 22 22 #include "periodentafel.hpp" 23 23 24 #ifdef HAVE_TESTRUNNER 25 #include "UnitTestMain.hpp" 26 #endif /*HAVE_TESTRUNNER*/ 27 24 28 /********************************************** Test classes **************************************/ 25 29 … … 250 254 CPPUNIT_ASSERT_EQUAL( TestMolecule->first->next, TestMolecule->last ); 251 255 }; 252 253 /********************************************** Main routine **************************************/254 255 int main(int argc, char **argv)256 {257 // Get the top level suite from the registry258 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();259 260 // Adds the test to the list of test to run261 CppUnit::TextUi::TestRunner runner;262 runner.addTest( suite );263 264 // Change the default outputter to a compiler error format outputter265 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),266 std::cerr ) );267 // Run the tests.268 bool wasSucessful = runner.run();269 270 // Return error code 1 if the one of test failed.271 return wasSucessful ? 0 : 1;272 }; -
src/unittests/logunittest.cpp
r685100 r9b6b2f 14 14 #include "defs.hpp" 15 15 #include "verbose.hpp" 16 17 #ifdef HAVE_TESTRUNNER 18 #include "UnitTestMain.hpp" 19 #endif /*HAVE_TESTRUNNER*/ 16 20 17 21 /********************************************** Test classes **************************************/ … … 48 52 eLog() << Verbose(4) << "This should not be printed." << endl; 49 53 }; 50 51 52 /********************************************** Main routine **************************************/53 54 int main(int argc, char **argv)55 {56 // Get the top level suite from the registry57 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();58 59 // Adds the test to the list of test to run60 CppUnit::TextUi::TestRunner runner;61 runner.addTest( suite );62 63 // Change the default outputter to a compiler error format outputter64 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),65 std::cerr ) );66 // Run the tests.67 bool wasSucessful = runner.run();68 69 // Return error code 1 if the one of test failed.70 return wasSucessful ? 0 : 1;71 }; -
src/unittests/memoryallocatorunittest.cpp
r685100 r9b6b2f 14 14 #include "helpers.hpp" 15 15 #include "defs.hpp" 16 17 #ifdef HAVE_TESTRUNNER 18 #include "UnitTestMain.hpp" 19 #endif /*HAVE_TESTRUNNER*/ 16 20 17 21 /********************************************** Test classes **************************************/ … … 102 106 Free(buffer2); 103 107 }; 104 105 106 /********************************************** Main routine **************************************/107 108 int main(int argc, char **argv)109 {110 // Get the top level suite from the registry111 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();112 113 // Adds the test to the list of test to run114 CppUnit::TextUi::TestRunner runner;115 runner.addTest( suite );116 117 // Change the default outputter to a compiler error format outputter118 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),119 std::cerr ) );120 // Run the tests.121 bool wasSucessful = runner.run();122 123 // Return error code 1 if the one of test failed.124 return wasSucessful ? 0 : 1;125 }; -
src/unittests/memoryusageobserverunittest.cpp
r685100 r9b6b2f 13 13 #include "memoryusageobserver.hpp" 14 14 #include "memoryusageobserverunittest.hpp" 15 16 #ifdef HAVE_TESTRUNNER 17 #include "UnitTestMain.hpp" 18 #endif /*HAVE_TESTRUNNER*/ 15 19 16 20 /********************************************** Test classes **************************************/ … … 136 140 CPPUNIT_ASSERT_EQUAL(i, (int*) MemoryUsageObserver::getInstance()->getPointersToAllocatedMemory().begin()->first); 137 141 }; 138 139 140 /********************************************** Main routine **************************************/141 142 int main(int argc, char **argv)143 {144 // Get the top level suite from the registry145 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();146 147 // Adds the test to the list of test to run148 CppUnit::TextUi::TestRunner runner;149 runner.addTest( suite );150 151 // Change the default outputter to a compiler error format outputter152 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),153 std::cerr ) );154 // Run the tests.155 bool wasSucessful = runner.run();156 157 // Return error code 1 if the one of test failed.158 return wasSucessful ? 0 : 1;159 }; -
src/unittests/stackclassunittest.cpp
r685100 r9b6b2f 14 14 #include "stackclassunittest.hpp" 15 15 #include "log.hpp" 16 17 #ifdef HAVE_TESTRUNNER 18 #include "UnitTestMain.hpp" 19 #endif /*HAVE_TESTRUNNER*/ 16 20 17 21 enum { testdimension=3 }; … … 67 71 CPPUNIT_ASSERT_EQUAL(0, Stack->ItemCount()); 68 72 }; 69 70 71 /********************************************** Main routine **************************************/72 73 int main(int argc, char **argv)74 {75 // Get the top level suite from the registry76 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();77 78 // Adds the test to the list of test to run79 CppUnit::TextUi::TestRunner runner;80 runner.addTest( suite );81 82 // Change the default outputter to a compiler error format outputter83 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),84 std::cerr ) );85 // Run the tests.86 bool wasSucessful = runner.run();87 88 // Return error code 1 if the one of test failed.89 return wasSucessful ? 0 : 1;90 }; -
src/unittests/tesselation_boundarytriangleunittest.cpp
r685100 r9b6b2f 17 17 #include "tesselation.hpp" 18 18 #include "tesselation_boundarytriangleunittest.hpp" 19 20 #ifdef HAVE_TESTRUNNER 21 #include "UnitTestMain.hpp" 22 #endif /*HAVE_TESTRUNNER*/ 19 23 20 24 #define SPHERERADIUS 2. … … 191 195 CPPUNIT_ASSERT_EQUAL( true , Point == TestIntersection ); 192 196 }; 193 194 195 /********************************************** Main routine **************************************/196 197 int main(int argc, char **argv)198 {199 // Get the top level suite from the registry200 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();201 202 // Adds the test to the list of test to run203 CppUnit::TextUi::TestRunner runner;204 runner.addTest( suite );205 206 // Change the default outputter to a compiler error format outputter207 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),208 std::cerr ) );209 // Run the tests.210 bool wasSucessful = runner.run();211 212 // Return error code 1 if the one of test failed.213 return wasSucessful ? 0 : 1;214 }; -
src/unittests/tesselation_insideoutsideunittest.cpp
r685100 r9b6b2f 17 17 #include "tesselation.hpp" 18 18 #include "tesselation_insideoutsideunittest.hpp" 19 20 #ifdef HAVE_TESTRUNNER 21 #include "UnitTestMain.hpp" 22 #endif /*HAVE_TESTRUNNER*/ 19 23 20 24 #define SPHERERADIUS 2. … … 161 165 } 162 166 }; 163 164 /********************************************** Main routine **************************************/165 166 int main(int argc, char **argv)167 {168 // Get the top level suite from the registry169 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();170 171 // Adds the test to the list of test to run172 CppUnit::TextUi::TestRunner runner;173 runner.addTest( suite );174 175 // Change the default outputter to a compiler error format outputter176 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),177 std::cerr ) );178 // Run the tests.179 bool wasSucessful = runner.run();180 181 // Return error code 1 if the one of test failed.182 return wasSucessful ? 0 : 1;183 }; -
src/unittests/tesselationunittest.cpp
r685100 r9b6b2f 18 18 #include "tesselation.hpp" 19 19 #include "tesselationunittest.hpp" 20 21 #ifdef HAVE_TESTRUNNER 22 #include "UnitTestMain.hpp" 23 #endif /*HAVE_TESTRUNNER*/ 20 24 21 25 #define SPHERERADIUS 2. … … 177 181 } 178 182 } 179 180 /********************************************** Main routine **************************************/181 182 int main(int argc, char **argv)183 {184 // Get the top level suite from the registry185 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();186 187 // Adds the test to the list of test to run188 CppUnit::TextUi::TestRunner runner;189 runner.addTest( suite );190 191 // Change the default outputter to a compiler error format outputter192 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),193 std::cerr ) );194 // Run the tests.195 bool wasSucessful = runner.run();196 197 // Return error code 1 if the one of test failed.198 return wasSucessful ? 0 : 1;199 }; -
src/unittests/vectorunittest.cpp
r685100 r9b6b2f 16 16 #include "vector.hpp" 17 17 #include "vectorunittest.hpp" 18 19 #ifdef HAVE_TESTRUNNER 20 #include "UnitTestMain.hpp" 21 #endif /*HAVE_TESTRUNNER*/ 18 22 19 23 /********************************************** Test classes **************************************/ … … 290 294 } 291 295 292 293 /********************************************** Main routine **************************************/294 295 int main(int argc, char **argv)296 {297 // Get the top level suite from the registry298 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();299 300 // Adds the test to the list of test to run301 CppUnit::TextUi::TestRunner runner;302 runner.addTest( suite );303 304 // Change the default outputter to a compiler error format outputter305 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),306 std::cerr ) );307 // Run the tests.308 bool wasSucessful = runner.run();309 310 // Return error code 1 if the one of test failed.311 return wasSucessful ? 0 : 1;312 };
Note:
See TracChangeset
for help on using the changeset viewer.