Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/unittests/AnalysisCorrelationToPointUnitTest.cpp

    re6fdbe r23b547  
    1717#include "AnalysisCorrelationToPointUnitTest.hpp"
    1818
     19#include "World.hpp"
    1920#include "atom.hpp"
    2021#include "boundary.hpp"
     
    5657
    5758  // construct periodentafel
    58   tafel = new periodentafel;
     59  tafel = World::getInstance().getPeriode();
    5960  tafel->AddElement(hydrogen);
    6061
    6162  // construct molecule (tetraeder of hydrogens)
    62   TestMolecule = new molecule(tafel);
    63   Walker = new atom();
     63  TestMolecule = World::getInstance().createMolecule();
     64  Walker = World::getInstance().createAtom();
    6465  Walker->type = hydrogen;
    6566  Walker->node->Init(1., 0., 1. );
    6667  TestMolecule->AddAtom(Walker);
    67   Walker = new atom();
     68  Walker = World::getInstance().createAtom();
    6869  Walker->type = hydrogen;
    6970  Walker->node->Init(0., 1., 1. );
    7071  TestMolecule->AddAtom(Walker);
    71   Walker = new atom();
     72  Walker = World::getInstance().createAtom();
    7273  Walker->type = hydrogen;
    7374  Walker->node->Init(1., 1., 0. );
    7475  TestMolecule->AddAtom(Walker);
    75   Walker = new atom();
     76  Walker = World::getInstance().createAtom();
    7677  Walker->type = hydrogen;
    7778  Walker->node->Init(0., 0., 0. );
     
    8182  CPPUNIT_ASSERT_EQUAL( TestMolecule->AtomCount, 4 );
    8283
    83   TestList = new MoleculeListClass;
     84  TestList = World::getInstance().getMolecules();
    8485  TestMolecule->ActiveFlag = true;
    8586  TestList->insert(TestMolecule);
     
    102103    delete(binmap);
    103104
    104   // remove
    105   delete(TestList);
    106   // note that all the atoms are cleaned by TestMolecule
    107105  delete(point);
    108   delete(tafel);
    109   // note that element is cleaned by periodentafel
    110   World::destroy();
     106  World::purgeInstance();
    111107  MemoryUsageObserver::purgeInstance();
    112108  logger::purgeInstance();
Note: See TracChangeset for help on using the changeset viewer.