- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/unittests/AnalysisCorrelationToPointUnitTest.cpp
re6fdbe r23b547 17 17 #include "AnalysisCorrelationToPointUnitTest.hpp" 18 18 19 #include "World.hpp" 19 20 #include "atom.hpp" 20 21 #include "boundary.hpp" … … 56 57 57 58 // construct periodentafel 58 tafel = new periodentafel;59 tafel = World::getInstance().getPeriode(); 59 60 tafel->AddElement(hydrogen); 60 61 61 62 // construct molecule (tetraeder of hydrogens) 62 TestMolecule = new molecule(tafel);63 Walker = new atom();63 TestMolecule = World::getInstance().createMolecule(); 64 Walker = World::getInstance().createAtom(); 64 65 Walker->type = hydrogen; 65 66 Walker->node->Init(1., 0., 1. ); 66 67 TestMolecule->AddAtom(Walker); 67 Walker = new atom();68 Walker = World::getInstance().createAtom(); 68 69 Walker->type = hydrogen; 69 70 Walker->node->Init(0., 1., 1. ); 70 71 TestMolecule->AddAtom(Walker); 71 Walker = new atom();72 Walker = World::getInstance().createAtom(); 72 73 Walker->type = hydrogen; 73 74 Walker->node->Init(1., 1., 0. ); 74 75 TestMolecule->AddAtom(Walker); 75 Walker = new atom();76 Walker = World::getInstance().createAtom(); 76 77 Walker->type = hydrogen; 77 78 Walker->node->Init(0., 0., 0. ); … … 81 82 CPPUNIT_ASSERT_EQUAL( TestMolecule->AtomCount, 4 ); 82 83 83 TestList = new MoleculeListClass;84 TestList = World::getInstance().getMolecules(); 84 85 TestMolecule->ActiveFlag = true; 85 86 TestList->insert(TestMolecule); … … 102 103 delete(binmap); 103 104 104 // remove105 delete(TestList);106 // note that all the atoms are cleaned by TestMolecule107 105 delete(point); 108 delete(tafel); 109 // note that element is cleaned by periodentafel 110 World::destroy(); 106 World::purgeInstance(); 111 107 MemoryUsageObserver::purgeInstance(); 112 108 logger::purgeInstance();
Note:
See TracChangeset
for help on using the changeset viewer.