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