Changeset 571d04


Ignore:
Timestamp:
Mar 28, 2012, 3:17:38 PM (13 years ago)
Author:
Frederik Heber <heber@…>
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:
84721b
Parents:
735940
git-author:
Frederik Heber <heber@…> (01/18/12 20:25:30)
git-committer:
Frederik Heber <heber@…> (03/28/12 15:17:38)
Message:

Renamed ShapeUnitTest -> BaseShapesUnitTest.

Location:
src/Shapes/unittests
Files:
1 edited
2 moved

Legend:

Unmodified
Added
Removed
  • src/Shapes/unittests/BaseShapesUnitTest.cpp

    r735940 r571d04  
    77
    88/*
    9  * ShapeUnittest.cpp
     9 * BaseShapesUnitTest.cpp
    1010 *
    1111 *  Created on: Jun 18, 2010
     
    2828#endif /*HAVE_TESTRUNNER*/
    2929
     30#include "CodePatterns/Assert.hpp"
     31
    3032#include "Helpers/defs.hpp"
    3133#include "LinearAlgebra/Vector.hpp"
     
    3335#include "Shapes/Shape.hpp"
    3436
    35 #include "ShapeUnitTest.hpp"
     37#include "BaseShapesUnitTest.hpp"
    3638
    3739// Registers the fixture into the 'registry'
    38 CPPUNIT_TEST_SUITE_REGISTRATION( ShapeUnittest );
    39 
    40 void ShapeUnittest::setUp()
     40CPPUNIT_TEST_SUITE_REGISTRATION( BaseShapesTest );
     41
     42void BaseShapesTest::setUp()
    4143{
     44  // failing asserts should be thrown
     45  ASSERT_DO(Assert::Throw);
     46
    4247  v000 =  0*unitVec[0]+0*unitVec[1]+0*unitVec[2];
    4348  v100 =  1*unitVec[0]+0*unitVec[1]+0*unitVec[2];
     
    6974}
    7075
    71 void ShapeUnittest::tearDown()
     76void BaseShapesTest::tearDown()
    7277{}
    7378
    7479
    75 void ShapeUnittest::baseShapesTest(){
     80void BaseShapesTest::baseShapesTest(){
    7681  CPPUNIT_ASSERT(!Nowhere().isInside(v000));
    7782  CPPUNIT_ASSERT(!Nowhere().isInside(v100));
     
    191196}
    192197
    193 void ShapeUnittest::surfaceTest(){
     198void BaseShapesTest::surfaceTest(){
    194199  CPPUNIT_ASSERT(!Nowhere().isOnSurface(v000));
    195200  CPPUNIT_ASSERT(!Nowhere().isOnSurface(v100));
     
    277282}
    278283
    279 void ShapeUnittest::assignmentTest(){
     284void BaseShapesTest::assignmentTest(){
    280285  Shape s1 = Nowhere();
    281286  s1 = Everywhere();
     
    342347}
    343348
    344 void ShapeUnittest::operatorTest(){
     349void BaseShapesTest::operatorTest(){
    345350  {
    346351    Shape s1 = !Nowhere();
     
    644649}
    645650
    646 void ShapeUnittest::PointsOnSurfaceTest(){
     651void BaseShapesTest::PointsOnSurfaceTest(){
    647652  Shape s = Sphere();
    648653  const size_t N = 200;
  • src/Shapes/unittests/BaseShapesUnitTest.hpp

    r735940 r571d04  
    11/*
    2  * ShapeUnittest.hpp
     2 * BaseShapesUnitTest.hpp
    33 *
    44 *  Created on: Jun 18, 2010
     
    66 */
    77
    8 #ifndef SHAPEUNITTEST_HPP_
    9 #define SHAPEUNITTEST_HPP_
     8#ifndef BASESHAPESUNITTEST_HPP_
     9#define BASESHAPESUNITTEST_HPP_
    1010
    1111// include config.h
     
    2222#include "LinearAlgebra/Vector.hpp"
    2323
    24 class ShapeUnittest : public CppUnit::TestFixture
     24class BaseShapesTest : public CppUnit::TestFixture
    2525{
    26   CPPUNIT_TEST_SUITE( ShapeUnittest) ;
     26  CPPUNIT_TEST_SUITE( BaseShapesTest) ;
    2727  CPPUNIT_TEST ( baseShapesTest );
    2828  CPPUNIT_TEST ( surfaceTest );
     
    7474};
    7575
    76 #endif /* SHAPEUNITTEST_HPP_ */
     76#endif /* BASESHAPESUNITTEST_HPP_ */
  • src/Shapes/unittests/Makefile.am

    r735940 r571d04  
    44
    55SHAPETESTSSOURCES = \
    6         ../Shapes/unittests/ShapeUnitTest.cpp
     6        ../Shapes/unittests/BaseShapesUnitTest.cpp
    77
    88SHAPETESTSHEADERS= \
    9         ../Shapes/unittests/ShapeUnitTest.hpp
     9        ../Shapes/unittests/BaseShapesUnitTest.hpp
    1010
    1111SHAPETESTS = \
    12   ShapeUnittest
     12  BaseShapesUnitTest
    1313 
    1414TESTS += $(SHAPETESTS)
     
    2222#       $(BOOST_LIB)
    2323
    24 ShapeUnittest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
    25         ../Shapes/unittests/ShapeUnitTest.cpp \
    26         ../Shapes/unittests/ShapeUnitTest.hpp
    27 nodist_ShapeUnittest_SOURCES = \
     24BaseShapesUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
     25        ../Shapes/unittests/BaseShapesUnitTest.cpp \
     26        ../Shapes/unittests/BaseShapesUnitTest.hpp
     27nodist_BaseShapesUnitTest_SOURCES = \
    2828        ../Helpers/defs.hpp \
    2929        ../Helpers/defs.cpp
    30 ShapeUnittest_LDADD = $(SHAPELIBS)
     30BaseShapesUnitTest_LDADD = $(SHAPELIBS)
    3131
    3232
Note: See TracChangeset for help on using the changeset viewer.