Changeset a1510d for src/unittests/tesselation_boundarytriangleunittest.cpp
- Timestamp:
- Feb 26, 2010, 1:57:01 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:
- a28a83, dbb474
- Parents:
- 1f2217 (diff), e6fdbe (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/unittests/tesselation_boundarytriangleunittest.cpp ¶
r1f2217 ra1510d 18 18 #include "tesselation_boundarytriangleunittest.hpp" 19 19 20 #ifdef HAVE_TESTRUNNER 21 #include "UnitTestMain.hpp" 22 #endif /*HAVE_TESTRUNNER*/ 23 20 24 #define SPHERERADIUS 2. 21 25 … … 31 35 32 36 // create nodes 33 TesselPoint *Walker = NULL; 34 Walker = new TesselPoint; 35 Walker->node = new Vector(0., 0., 0.); 36 Walker->Name = Malloc<char>(3, "TesselationBoundaryTriangleTest::setUp - *Name"); 37 strcpy(Walker->Name, "1"); 38 Walker->nr = 1; 39 points[0] = new BoundaryPointSet(Walker); 40 Walker = new TesselPoint; 41 Walker->node = new Vector(0., 1., 0.); 42 Walker->Name = Malloc<char>(3, "TesselationBoundaryTriangleTest::setUp - *Name"); 43 strcpy(Walker->Name, "2"); 44 Walker->nr = 2; 45 points[1] = new BoundaryPointSet(Walker); 46 Walker = new TesselPoint; 47 Walker->node = new Vector(1., 0., 0.); 48 Walker->Name = Malloc<char>(3, "TesselationBoundaryTriangleTest::setUp - *Name"); 49 strcpy(Walker->Name, "3"); 50 Walker->nr = 3; 51 points[2] = new BoundaryPointSet(Walker); 37 tesselpoints[0] = new TesselPoint; 38 tesselpoints[0]->node = new Vector(0., 0., 0.); 39 tesselpoints[0]->Name = Malloc<char>(3, "TesselationBoundaryTriangleTest::setUp - *Name"); 40 strcpy(tesselpoints[0]->Name, "1"); 41 tesselpoints[0]->nr = 1; 42 points[0] = new BoundaryPointSet(tesselpoints[0]); 43 tesselpoints[1] = new TesselPoint; 44 tesselpoints[1]->node = new Vector(0., 1., 0.); 45 tesselpoints[1]->Name = Malloc<char>(3, "TesselationBoundaryTriangleTest::setUp - *Name"); 46 strcpy(tesselpoints[1]->Name, "2"); 47 tesselpoints[1]->nr = 2; 48 points[1] = new BoundaryPointSet(tesselpoints[1]); 49 tesselpoints[2] = new TesselPoint; 50 tesselpoints[2] ->node = new Vector(1., 0., 0.); 51 tesselpoints[2] ->Name = Malloc<char>(3, "TesselationBoundaryTriangleTest::setUp - *Name"); 52 strcpy(tesselpoints[2] ->Name, "3"); 53 tesselpoints[2] ->nr = 3; 54 points[2] = new BoundaryPointSet(tesselpoints[2] ); 52 55 53 56 // create line … … 65 68 { 66 69 delete(triangle); 70 for (int i=0;i<3;++i) { 71 // TesselPoint does not delete its vector as it only got a reference 72 delete tesselpoints[i]->node; 73 delete tesselpoints[i]; 74 } 67 75 MemoryUsageObserver::purgeInstance(); 68 76 logger::purgeInstance(); … … 191 199 CPPUNIT_ASSERT_EQUAL( true , Point == TestIntersection ); 192 200 }; 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 };
Note:
See TracChangeset
for help on using the changeset viewer.