Changeset 7a0340
- Timestamp:
- Oct 6, 2011, 7:17:46 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:
- cec7a5
- Parents:
- e420f9
- git-author:
- Frederik Heber <heber@…> (04/23/11 19:41:36)
- git-committer:
- Frederik Heber <heber@…> (10/06/11 07:17:46)
- Location:
- LinearAlgebra/src/unittests
- Files:
-
- 1 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
LinearAlgebra/src/unittests/Makefile.am
re420f9 r7a0340 12 12 MatrixContentSymmetricUnitTest \ 13 13 MatrixContentUnitTest \ 14 MatrixUnitTest \15 14 PlaneUnitTest \ 15 RealSpaceMatrixUnitTest \ 16 16 VectorContentUnitTest \ 17 17 VectorUnitTest … … 31 31 MatrixContentSymmetricUnitTest.cpp \ 32 32 MatrixContentUnitTest.cpp \ 33 MatrixUnitTest.cpp \34 33 PlaneUnitTest.cpp \ 34 RealSpaceMatrixUnitTest.cpp \ 35 35 VectorContentUnitTest.cpp \ 36 36 VectorUnitTest.cpp … … 41 41 MatrixContentSymmetricUnitTest.hpp \ 42 42 MatrixContentUnitTest.hpp \ 43 MatrixUnitTest.hpp \44 43 PlaneUnitTest.hpp \ 44 RealSpaceMatrixUnitTest.hpp \ 45 45 VectorContentUnitTest.hpp \ 46 46 VectorUnitTest.hpp … … 66 66 MatrixContentUnitTest_LDADD = ${GSLLIBS} 67 67 68 MatrixUnitTest_SOURCES = UnitTestMain.cpp \69 MatrixUnitTest.cpp \70 MatrixUnitTest.hpp71 MatrixUnitTest_LDADD = ${GSLLIBS}72 73 68 PlaneUnitTest_SOURCES = UnitTestMain.cpp \ 74 69 PlaneUnitTest.cpp \ 75 70 PlaneUnitTest.hpp 76 71 PlaneUnitTest_LDADD = ${GSLLIBS} 72 73 RealSpaceMatrixUnitTest_SOURCES = UnitTestMain.cpp \ 74 RealSpaceMatrixUnitTest.cpp \ 75 RealSpaceMatrixUnitTest.hpp 76 RealSpaceMatrixUnitTest_LDADD = ${GSLLIBS} 77 77 78 78 VectorContentUnitTest_SOURCES = UnitTestMain.cpp \ -
LinearAlgebra/src/unittests/RealSpaceMatrixUnitTest.cpp
re420f9 r7a0340 7 7 8 8 /* 9 * MatrixUnitTest.cpp9 * RealSpaceMatrixUnitTest.cpp 10 10 * 11 11 * Created on: Jul 7, 2010 … … 25 25 #include <limits> 26 26 27 #include " MatrixUnitTest.hpp"27 #include "RealSpaceMatrixUnitTest.hpp" 28 28 29 29 #include "defs.hpp" … … 37 37 38 38 // Registers the fixture into the 'registry' 39 CPPUNIT_TEST_SUITE_REGISTRATION( MatrixUnittest );40 41 void MatrixUnittest::setUp(){39 CPPUNIT_TEST_SUITE_REGISTRATION( RealSpaceMatrixTest ); 40 41 void RealSpaceMatrixTest::setUp(){ 42 42 zero = new RealSpaceMatrix(); 43 43 for(int i =NDIM;i--;) { … … 87 87 88 88 } 89 void MatrixUnittest::tearDown(){89 void RealSpaceMatrixTest::tearDown(){ 90 90 delete zero; 91 91 delete one; … … 99 99 } 100 100 101 void MatrixUnittest::AccessTest(){101 void RealSpaceMatrixTest::AccessTest(){ 102 102 RealSpaceMatrix mat; 103 103 for(int i=NDIM;i--;){ … … 121 121 } 122 122 123 void MatrixUnittest::VectorTest(){123 void RealSpaceMatrixTest::VectorTest(){ 124 124 RealSpaceMatrix mat; 125 125 for(int i=NDIM;i--;){ … … 175 175 } 176 176 177 void MatrixUnittest::TransposeTest(){177 void RealSpaceMatrixTest::TransposeTest(){ 178 178 RealSpaceMatrix res; 179 179 … … 189 189 } 190 190 191 void MatrixUnittest::OperationTest(){191 void RealSpaceMatrixTest::OperationTest(){ 192 192 RealSpaceMatrix res; 193 193 … … 262 262 } 263 263 264 void MatrixUnittest::RotationTest(){264 void RealSpaceMatrixTest::RotationTest(){ 265 265 RealSpaceMatrix res; 266 266 RealSpaceMatrix inverse; … … 284 284 } 285 285 286 void MatrixUnittest::InvertTest(){286 void RealSpaceMatrixTest::InvertTest(){ 287 287 CPPUNIT_ASSERT_THROW(zero->invert(),NotInvertibleException); 288 288 CPPUNIT_ASSERT_THROW(full->invert(),NotInvertibleException); … … 306 306 307 307 308 void MatrixUnittest::DeterminantTest(){308 void RealSpaceMatrixTest::DeterminantTest(){ 309 309 CPPUNIT_ASSERT_EQUAL(zero->determinant(),0.); 310 310 CPPUNIT_ASSERT_EQUAL(one->determinant(),1.); … … 318 318 } 319 319 320 void MatrixUnittest::VecMultTest(){320 void RealSpaceMatrixTest::VecMultTest(){ 321 321 CPPUNIT_ASSERT_EQUAL((*zero)*unitVec[0],zeroVec); 322 322 CPPUNIT_ASSERT_EQUAL((*zero)*unitVec[1],zeroVec); -
LinearAlgebra/src/unittests/RealSpaceMatrixUnitTest.hpp
re420f9 r7a0340 1 1 /* 2 * MatrixUnitTest.hpp2 * RealSpaceMatrixUnitTest.hpp 3 3 * 4 4 * Created on: Jul 7, 2010 … … 6 6 */ 7 7 8 #ifndef MATRIXUNITTEST_HPP_9 #define MATRIXUNITTEST_HPP_8 #ifndef REALSPACEMATRIXUNITTEST_HPP_ 9 #define REALSPACEMATRIXUNITTEST_HPP_ 10 10 11 11 // include config.h … … 19 19 class RealSpaceMatrix; 20 20 21 class MatrixUnittest : public CppUnit::TestFixture21 class RealSpaceMatrixTest : public CppUnit::TestFixture 22 22 { 23 CPPUNIT_TEST_SUITE( MatrixUnittest) ;23 CPPUNIT_TEST_SUITE( RealSpaceMatrixTest) ; 24 24 CPPUNIT_TEST ( AccessTest ); 25 25 CPPUNIT_TEST ( VectorTest ); … … 56 56 }; 57 57 58 #endif /* MATRIXUNITTEST_HPP_ */58 #endif /* REALSPACEMATRIXUNITTEST_HPP_ */
Note:
See TracChangeset
for help on using the changeset viewer.