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