Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/unittests/AnalysisPairCorrelationUnitTest.cpp

    re6fdbe r23b547  
    1717#include "AnalysisPairCorrelationUnitTest.hpp"
    1818
     19#include "World.hpp"
    1920#include "atom.hpp"
    2021#include "boundary.hpp"
     
    5556
    5657  // construct periodentafel
    57   tafel = new periodentafel;
     58  tafel = World::getInstance().getPeriode();
    5859  tafel->AddElement(hydrogen);
    5960
    6061  // construct molecule (tetraeder of hydrogens)
    61   TestMolecule = new molecule(tafel);
    62   Walker = new atom();
     62  TestMolecule = World::getInstance().createMolecule();
     63  Walker = World::getInstance().createAtom();
    6364  Walker->type = hydrogen;
    6465  Walker->node->Init(1., 0., 1. );
    6566  TestMolecule->AddAtom(Walker);
    66   Walker = new atom();
     67  Walker = World::getInstance().createAtom();
    6768  Walker->type = hydrogen;
    6869  Walker->node->Init(0., 1., 1. );
    6970  TestMolecule->AddAtom(Walker);
    70   Walker = new atom();
     71  Walker = World::getInstance().createAtom();
    7172  Walker->type = hydrogen;
    7273  Walker->node->Init(1., 1., 0. );
    7374  TestMolecule->AddAtom(Walker);
    74   Walker = new atom();
     75  Walker = World::getInstance().createAtom();
    7576  Walker->type = hydrogen;
    7677  Walker->node->Init(0., 0., 0. );
     
    8081  CPPUNIT_ASSERT_EQUAL( TestMolecule->AtomCount, 4 );
    8182
    82   TestList = new MoleculeListClass;
     83  TestList = World::getInstance().getMolecules();
    8384  TestMolecule->ActiveFlag = true;
    8485  TestList->insert(TestMolecule);
     
    9899    delete(binmap);
    99100
    100   // remove
    101   delete(TestList);
    102101  // 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();
    106103  MemoryUsageObserver::purgeInstance();
    107104  logger::purgeInstance();
Note: See TracChangeset for help on using the changeset viewer.