- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/unittests/listofbondsunittest.cpp
r23b547 re6fdbe 16 16 #include "listofbondsunittest.hpp" 17 17 18 #include "World.hpp"19 18 #include "atom.hpp" 20 19 #include "bond.hpp" … … 51 50 52 51 // construct periodentafel 53 tafel = World::getInstance().getPeriode();52 tafel = new periodentafel; 54 53 tafel->AddElement(hydrogen); 55 54 56 55 // construct molecule (tetraeder of hydrogens) 57 TestMolecule = World::getInstance().createMolecule();58 Walker = World::getInstance().createAtom();56 TestMolecule = new molecule(tafel); 57 Walker = new atom(); 59 58 Walker->type = hydrogen; 60 59 Walker->node->Init(1., 0., 1. ); 61 60 TestMolecule->AddAtom(Walker); 62 Walker = World::getInstance().createAtom();61 Walker = new atom(); 63 62 Walker->type = hydrogen; 64 63 Walker->node->Init(0., 1., 1. ); 65 64 TestMolecule->AddAtom(Walker); 66 Walker = World::getInstance().createAtom();65 Walker = new atom(); 67 66 Walker->type = hydrogen; 68 67 Walker->node->Init(1., 1., 0. ); 69 68 TestMolecule->AddAtom(Walker); 70 Walker = World::getInstance().createAtom();69 Walker = new atom(); 71 70 Walker->type = hydrogen; 72 71 Walker->node->Init(0., 0., 0. ); … … 82 81 { 83 82 // remove 84 World::getInstance().destroyMolecule(TestMolecule); 85 // note that all the atoms, molecules, the tafel and the elements 86 // are all cleaned when the world is destroyed 87 World::purgeInstance(); 83 delete(TestMolecule); 84 // note that all the atoms are cleaned by TestMolecule 85 delete(tafel); 86 // note that element is cleaned by periodentafel 87 World::destroy(); 88 88 MemoryUsageObserver::purgeInstance(); 89 89 logger::purgeInstance(); … … 250 250 251 251 // remove atom2 252 World::getInstance().destroyAtom(atom2);252 delete(atom2); 253 253 254 254 // check bond if removed from other atom
Note:
See TracChangeset
for help on using the changeset viewer.