Changeset dbb533 for src/Parameters/unittests
- Timestamp:
- Apr 17, 2012, 11:39:19 AM (13 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:
- c513b7
- Parents:
- c68409
- git-author:
- Michael Ankele <ankele@…> (04/10/12 11:52:53)
- git-committer:
- Michael Ankele <ankele@…> (04/17/12 11:39:19)
- Location:
- src/Parameters/unittests
- Files:
-
- 4 deleted
- 1 edited
- 8 moved
Legend:
- Unmodified
- Added
- Removed
-
src/Parameters/unittests/ContinuousParameterTest.cpp
rc68409 rdbb533 7 7 8 8 /* 9 * ContinuousParameter UnitTest.cpp9 * ContinuousParameterTest.cpp 10 10 * 11 11 * Created on: Sep 30, 2011 … … 18 18 #endif 19 19 20 #include "ContinuousParameter UnitTest.hpp"20 #include "ContinuousParameterTest.hpp" 21 21 22 22 #include <cppunit/CompilerOutputter.h> … … 24 24 #include <cppunit/ui/text/TestRunner.h> 25 25 26 #include "Par ser/Parameters/ContinuousParameter.hpp"26 #include "Parameters/ContinuousParameter.hpp" 27 27 28 28 #include "CodePatterns/Range.hpp" -
src/Parameters/unittests/ContinuousParameterTest.hpp
rc68409 rdbb533 1 1 /* 2 * ContinuousParameter UnitTest.hpp2 * ContinuousParameterTest.hpp 3 3 * 4 4 * Created on: Sep 30, 2011 5 5 * Author: heber 6 6 */ 7 #ifndef CONTINUOUSPARAMETER UNITTEST_HPP_8 #define CONTINUOUSPARAMETER UNITTEST_HPP_7 #ifndef CONTINUOUSPARAMETERTEST_HPP_ 8 #define CONTINUOUSPARAMETERTEST_HPP_ 9 9 10 10 // include config.h … … 37 37 }; 38 38 39 #endif /* CONTINUOUSPARAMETER UNITTEST_HPP_ */39 #endif /* CONTINUOUSPARAMETERTEST_HPP_ */ -
src/Parameters/unittests/ContinuousValueTest.cpp
rc68409 rdbb533 7 7 8 8 /* 9 * ContinuousValue UnitTest.cpp9 * ContinuousValueTest.cpp 10 10 * 11 11 * Created on: Sep 29, 2011 … … 18 18 #endif 19 19 20 #include "ContinuousValue UnitTest.hpp"20 #include "ContinuousValueTest.hpp" 21 21 22 22 #include <cppunit/CompilerOutputter.h> … … 24 24 #include <cppunit/ui/text/TestRunner.h> 25 25 26 #include "Parser/Parameters/ContinuousValue.hpp" 27 28 #include "CodePatterns/toString.hpp" 26 #include "Parameters/ContinuousValue.hpp" 29 27 30 28 #ifdef HAVE_TESTRUNNER … … 80 78 // checking valid values 81 79 for (int i=1; i<=4;++i) 82 CPPUNIT_ASSERT_EQUAL(true, test.isValid( toString(i)));80 CPPUNIT_ASSERT_EQUAL(true, test.isValid(i)); 83 81 84 82 // checking invalid values 85 83 for (int i=-10; i<=0;++i) 86 CPPUNIT_ASSERT_EQUAL(false, test.isValid( toString(i)));84 CPPUNIT_ASSERT_EQUAL(false, test.isValid(i)); 87 85 for (int i=5; i<=0;++i) 88 CPPUNIT_ASSERT_EQUAL(false, test.isValid( toString(i)));86 CPPUNIT_ASSERT_EQUAL(false, test.isValid(i)); 89 87 } 90 88 … … 179 177 #ifndef NDEBUG 180 178 std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl; 181 CPPUNIT_ASSERT_THROW(test.set( toString(5)), Assert::AssertionFailure);182 #endif 183 #ifndef NDEBUG 184 std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl; 185 CPPUNIT_ASSERT_THROW(test.set( toString(0)), Assert::AssertionFailure);179 CPPUNIT_ASSERT_THROW(test.set(5), Assert::AssertionFailure); 180 #endif 181 #ifndef NDEBUG 182 std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl; 183 CPPUNIT_ASSERT_THROW(test.set(0), Assert::AssertionFailure); 186 184 #endif 187 185 188 186 // checking all valid ones 189 187 for (int i=1; i<=4;++i) { 190 test.set( toString(i));191 CPPUNIT_ASSERT_EQUAL( toString(i), test.get());188 test.set(i); 189 CPPUNIT_ASSERT_EQUAL(i, test.get()); 192 190 } 193 191 } -
src/Parameters/unittests/ContinuousValueTest.hpp
rc68409 rdbb533 1 1 /* 2 * ContinuousValue UnitTest.hpp2 * ContinuousValueTest.hpp 3 3 * 4 4 * Created on: Sep 29, 2011 5 5 * Author: heber 6 6 */ 7 #ifndef CONTINUOUSVALUE UNITTEST_HPP_8 #define CONTINUOUSVALUE UNITTEST_HPP_7 #ifndef CONTINUOUSVALUETEST_HPP_ 8 #define CONTINUOUSVALUETEST_HPP_ 9 9 10 10 // include config.h … … 45 45 }; 46 46 47 #endif /* CONTINUOUSVALUE UNITTEST_HPP_ */47 #endif /* CONTINUOUSVALUETEST_HPP_ */ -
src/Parameters/unittests/DiscreteParameterTest.cpp
rc68409 rdbb533 7 7 8 8 /* 9 * DiscreteParameter UnitTest.cpp9 * DiscreteParameterTest.cpp 10 10 * 11 11 * Created on: Sep 30, 2011 … … 18 18 #endif 19 19 20 #include "DiscreteParameter UnitTest.hpp"20 #include "DiscreteParameterTest.hpp" 21 21 22 22 #include <cppunit/CompilerOutputter.h> … … 24 24 #include <cppunit/ui/text/TestRunner.h> 25 25 26 #include "Par ser/Parameters/DiscreteParameter.hpp"26 #include "Parameters/DiscreteParameter.hpp" 27 27 28 28 #ifdef HAVE_TESTRUNNER -
src/Parameters/unittests/DiscreteParameterTest.hpp
rc68409 rdbb533 1 1 /* 2 * DiscreteParameter UnitTest.hpp2 * DiscreteParameterTest.hpp 3 3 * 4 4 * Created on: Sep 30, 2011 5 5 * Author: heber 6 6 */ 7 #ifndef DISCRETEPARAMETER UNITTEST_HPP_8 #define DISCRETEPARAMETER UNITTEST_HPP_7 #ifndef DISCRETEPARAMETERTEST_HPP_ 8 #define DISCRETEPARAMETERTEST_HPP_ 9 9 10 10 // include config.h … … 35 35 }; 36 36 37 #endif /* DISCRETEPARAMETER UNITTEST_HPP_ */37 #endif /* DISCRETEPARAMETERTEST_HPP_ */ -
src/Parameters/unittests/DiscreteValueTest.cpp
rc68409 rdbb533 7 7 8 8 /* 9 * DiscreteValue UnitTest.cpp9 * DiscreteValueTest.cpp 10 10 * 11 11 * Created on: Sep 28, 2011 … … 18 18 #endif 19 19 20 #include "DiscreteValue UnitTest.hpp"20 #include "DiscreteValueTest.hpp" 21 21 22 22 #include <cppunit/CompilerOutputter.h> … … 24 24 #include <cppunit/ui/text/TestRunner.h> 25 25 26 #include "Parser/Parameters/DiscreteValue.hpp" 27 28 #include "CodePatterns/toString.hpp" 26 #include "Parameters/DiscreteValue.hpp" 29 27 30 28 #ifdef HAVE_TESTRUNNER … … 104 102 // checking valid values 105 103 for (int i=1; i<=3;++i) 106 CPPUNIT_ASSERT_EQUAL(true, test.isValid( toString(i)));107 108 // checking invalid values 109 for (int i=-10; i<=0;++i) 110 CPPUNIT_ASSERT_EQUAL(false, test.isValid( toString(i)));104 CPPUNIT_ASSERT_EQUAL(true, test.isValid(i)); 105 106 // checking invalid values 107 for (int i=-10; i<=0;++i) 108 CPPUNIT_ASSERT_EQUAL(false, test.isValid(i)); 111 109 for (int i=4; i<=0;++i) 112 CPPUNIT_ASSERT_EQUAL(false, test.isValid( toString(i)));110 CPPUNIT_ASSERT_EQUAL(false, test.isValid(i)); 113 111 } 114 112 … … 167 165 #ifndef NDEBUG 168 166 std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl; 169 CPPUNIT_ASSERT_THROW(test.set( toString(4)), Assert::AssertionFailure);170 #endif 171 #ifndef NDEBUG 172 std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl; 173 CPPUNIT_ASSERT_THROW(test.set( toString(0)), Assert::AssertionFailure);167 CPPUNIT_ASSERT_THROW(test.set(4), Assert::AssertionFailure); 168 #endif 169 #ifndef NDEBUG 170 std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl; 171 CPPUNIT_ASSERT_THROW(test.set(0), Assert::AssertionFailure); 174 172 #endif 175 173 176 174 // checking all valid ones 177 175 for (int i=1; i<=3;++i) { 178 test.set( toString(i));179 CPPUNIT_ASSERT_EQUAL( toString(i), test.get());176 test.set(i); 177 CPPUNIT_ASSERT_EQUAL(i, test.get()); 180 178 } 181 179 -
src/Parameters/unittests/DiscreteValueTest.hpp
rc68409 rdbb533 1 1 /* 2 * DiscreteValue UnitTest.hpp2 * DiscreteValueTest.hpp 3 3 * 4 4 * Created on: Sep 28, 2011 5 5 * Author: heber 6 6 */ 7 #ifndef DISCRETEVALUE UNITTEST_HPP_8 #define DISCRETEVALUE UNITTEST_HPP_7 #ifndef DISCRETEVALUETEST_HPP_ 8 #define DISCRETEVALUETEST_HPP_ 9 9 10 10 // include config.h … … 45 45 }; 46 46 47 #endif /* DISCRETEVALUE UNITTEST_HPP_ */47 #endif /* DISCRETEVALUETEST_HPP_ */ -
src/Parameters/unittests/Makefile.am
rc68409 rdbb533 3 3 4 4 5 PARSERPARAMETERSTESTSSOURCES = \ 6 ../Parameters/unittests/ContinuousValueUnitTest.cpp \ 7 ../Parameters/unittests/ContinuousParameterUnitTest.cpp \ 8 ../Parameters/unittests/DiscreteValueUnitTest.cpp \ 9 ../Parameters/unittests/DiscreteParameterUnitTest.cpp \ 10 ../Parameters/unittests/ParameterStorageUnitTest.cpp \ 11 ../Parameters/unittests/StringParameterUnitTest.cpp 5 PARAMETERSTESTSSOURCES = \ 6 ../Parameters/unittests/ContinuousValueTest.cpp \ 7 ../Parameters/unittests/ContinuousParameterTest.cpp \ 8 ../Parameters/unittests/DiscreteValueTest.cpp \ 9 ../Parameters/unittests/DiscreteParameterTest.cpp 12 10 13 PARSERPARAMETERSTESTSHEADERS = \ 14 ../Parameters/unittests/ContinuousValueUnitTest.hpp \ 15 ../Parameters/unittests/ContinuousParameterUnitTest.hpp \ 16 ../Parameters/unittests/DiscreteValueUnitTest.hpp \ 17 ../Parameters/unittests/DiscreteParameterUnitTest.hpp \ 18 ../Parameters/unittests/ParameterStorageUnitTest.hpp \ 19 ../Parameters/unittests/StringParameterUnitTest.hpp 11 PARAMETERSTESTSHEADERS = \ 12 ../Parameters/unittests/ContinuousValueTest.hpp \ 13 ../Parameters/unittests/ContinuousParameterTest.hpp \ 14 ../Parameters/unittests/DiscreteValueTest.hpp \ 15 ../Parameters/unittests/DiscreteParameterTest.hpp 20 16 21 PARSERPARAMETERSTESTS = \ 22 ContinuousValueUnitTest \ 23 ContinuousParameterUnitTest \ 24 DiscreteValueUnitTest \ 25 DiscreteParameterUnitTest \ 26 ParameterStorageUnitTest \ 27 StringParameterUnitTest 17 PARAMETERSTESTS = \ 18 ContinuousValueTest \ 19 ContinuousParameterTest \ 20 DiscreteValueTest \ 21 DiscreteParameterTest 28 22 29 TESTS += $(PAR SERPARAMETERSTESTS)30 check_PROGRAMS += $(PAR SERPARAMETERSTESTS)31 noinst_PROGRAMS += $(PAR SERPARAMETERSTESTS)23 TESTS += $(PARAMETERSTESTS) 24 check_PROGRAMS += $(PARAMETERSTESTS) 25 noinst_PROGRAMS += $(PARAMETERSTESTS) 32 26 33 PAR SERPARAMETERSLIBS =27 PARAMETERSLIBS = 34 28 35 29 36 ContinuousValue UnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \37 ../Parameters/unittests/ContinuousValue UnitTest.cpp \38 ../Parameters/unittests/ContinuousValue UnitTest.hpp \30 ContinuousValueTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \ 31 ../Parameters/unittests/ContinuousValueTest.cpp \ 32 ../Parameters/unittests/ContinuousValueTest.hpp \ 39 33 ../Parameters/ContinuousValue.hpp \ 40 34 ../Parameters/ContinuousValue_impl.hpp \ 41 35 ../Parameters/ValueInterface.hpp 42 ContinuousValue UnitTest_LDADD = \43 $(PAR SERPARAMETERSLIBS)36 ContinuousValueTest_LDADD = \ 37 $(PARAMETERSLIBS) 44 38 45 ContinuousParameter UnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \46 ../Parameters/unittests/ContinuousParameter UnitTest.cpp \47 ../Parameters/unittests/ContinuousParameter UnitTest.hpp \39 ContinuousParameterTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \ 40 ../Parameters/unittests/ContinuousParameterTest.cpp \ 41 ../Parameters/unittests/ContinuousParameterTest.hpp \ 48 42 ../Parameters/ContinuousValue.hpp \ 49 43 ../Parameters/ContinuousValue_impl.hpp \ … … 52 46 ../Parameters/Parameter.hpp \ 53 47 ../Parameters/ValueInterface.hpp 54 ContinuousParameter UnitTest_LDADD = \55 $(PAR SERPARAMETERSLIBS)48 ContinuousParameterTest_LDADD = \ 49 $(PARAMETERSLIBS) 56 50 57 DiscreteValue UnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \58 ../Parameters/unittests/DiscreteValue UnitTest.cpp \59 ../Parameters/unittests/DiscreteValue UnitTest.hpp \51 DiscreteValueTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \ 52 ../Parameters/unittests/DiscreteValueTest.cpp \ 53 ../Parameters/unittests/DiscreteValueTest.hpp \ 60 54 ../Parameters/DiscreteValue.hpp \ 61 55 ../Parameters/DiscreteValue_impl.hpp \ 62 56 ../Parameters/ValueInterface.hpp 63 DiscreteValue UnitTest_LDADD = \64 $(PAR SERPARAMETERSLIBS)57 DiscreteValueTest_LDADD = \ 58 $(PARAMETERSLIBS) 65 59 66 DiscreteParameter UnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \67 ../Parameters/unittests/DiscreteParameter UnitTest.cpp \68 ../Parameters/unittests/DiscreteParameter UnitTest.hpp \60 DiscreteParameterTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \ 61 ../Parameters/unittests/DiscreteParameterTest.cpp \ 62 ../Parameters/unittests/DiscreteParameterTest.hpp \ 69 63 ../Parameters/DiscreteValue.hpp \ 70 64 ../Parameters/DiscreteValue_impl.hpp \ … … 73 67 ../Parameters/Parameter.hpp \ 74 68 ../Parameters/ValueInterface.hpp 75 DiscreteParameterUnitTest_LDADD = \ 76 $(PARSERPARAMETERSLIBS) 77 78 ParameterStorageUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \ 79 ../Parameters/unittests/ParameterStorageUnitTest.cpp \ 80 ../Parameters/unittests/ParameterStorageUnitTest.hpp \ 81 ../Parameters/ParameterStorage.cpp \ 82 ../Parameters/ParameterStorage.hpp \ 83 ../Parameters/ContinuousValue.hpp \ 84 ../Parameters/ContinuousValue_impl.hpp \ 85 ../Parameters/DiscreteValue.hpp \ 86 ../Parameters/DiscreteValue_impl.hpp \ 87 ../Parameters/ValueInterface.hpp 88 ParameterStorageUnitTest_LDADD = \ 89 $(CodePatterns_LIBS) \ 90 $(PARSERPARAMETERSLIBS) 91 92 StringParameterUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \ 93 ../Parameters/unittests/StringParameterUnitTest.cpp \ 94 ../Parameters/unittests/StringParameterUnitTest.hpp \ 95 ../Parameters/StringParameter.cpp \ 96 ../Parameters/StringParameter.hpp \ 97 ../Parameters/Parameter.hpp \ 98 ../Parameters/ValueInterface.hpp 99 StringParameterUnitTest_LDADD = \ 100 $(PARSERPARAMETERSLIBS) 69 DiscreteParameterTest_LDADD = \ 70 $(PARAMETERSLIBS) 101 71 102 72
Note:
See TracChangeset
for help on using the changeset viewer.