Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/unittests/AnalysisCorrelationToSurfaceUnitTest.cpp

    r5be0eb re6fdbe  
    1717#include "AnalysisCorrelationToSurfaceUnitTest.hpp"
    1818
    19 #include "World.hpp"
    2019#include "atom.hpp"
    2120#include "boundary.hpp"
     
    2726#include "World.hpp"
    2827
    29 #include "Helpers/Assert.hpp"
    30 
    3128#ifdef HAVE_TESTRUNNER
    3229#include "UnitTestMain.hpp"
     
    4037void AnalysisCorrelationToSurfaceUnitTest::setUp()
    4138{
    42   ASSERT_DO(Assert::Throw);
    43 
    4439  atom *Walker = NULL;
    4540
     
    6560
    6661  // construct periodentafel
    67   tafel = World::getInstance().getPeriode();
     62  tafel = new periodentafel;
    6863  tafel->AddElement(hydrogen);
    6964  tafel->AddElement(carbon);
    7065
    7166  // construct molecule (tetraeder of hydrogens) base
    72   TestMolecule = World::getInstance().createMolecule();
    73   Walker = World::getInstance().createAtom();
     67  TestMolecule = new molecule(tafel);
     68  Walker = new atom();
    7469  Walker->type = hydrogen;
    7570  Walker->node->Init(1., 0., 1. );
    7671  TestMolecule->AddAtom(Walker);
    77   Walker = World::getInstance().createAtom();
     72  Walker = new atom();
    7873  Walker->type = hydrogen;
    7974  Walker->node->Init(0., 1., 1. );
    8075  TestMolecule->AddAtom(Walker);
    81   Walker = World::getInstance().createAtom();
     76  Walker = new atom();
    8277  Walker->type = hydrogen;
    8378  Walker->node->Init(1., 1., 0. );
    8479  TestMolecule->AddAtom(Walker);
    85   Walker = World::getInstance().createAtom();
     80  Walker = new atom();
    8681  Walker->type = hydrogen;
    8782  Walker->node->Init(0., 0., 0. );
     
    9186  CPPUNIT_ASSERT_EQUAL( TestMolecule->AtomCount, 4 );
    9287
    93   TestList = World::getInstance().getMolecules();
     88  TestList = new MoleculeListClass;
    9489  TestMolecule->ActiveFlag = true;
    9590  TestList->insert(TestMolecule);
     
    10499
    105100  // add outer atoms
    106   Walker = World::getInstance().createAtom();
     101  Walker = new atom();
    107102  Walker->type = carbon;
    108103  Walker->node->Init(4., 0., 4. );
    109104  TestMolecule->AddAtom(Walker);
    110   Walker = World::getInstance().createAtom();
     105  Walker = new atom();
    111106  Walker->type = carbon;
    112107  Walker->node->Init(0., 4., 4. );
    113108  TestMolecule->AddAtom(Walker);
    114   Walker = World::getInstance().createAtom();
     109  Walker = new atom();
    115110  Walker->type = carbon;
    116111  Walker->node->Init(4., 4., 0. );
    117112  TestMolecule->AddAtom(Walker);
    118113  // add inner atoms
    119   Walker = World::getInstance().createAtom();
     114  Walker = new atom();
    120115  Walker->type = carbon;
    121116  Walker->node->Init(0.5, 0.5, 0.5 );
     
    136131    delete(binmap);
    137132
     133  // remove
     134  delete(TestList);
    138135  delete(Surface);
    139136  // note that all the atoms are cleaned by TestMolecule
    140137  delete(LC);
    141   World::purgeInstance();
     138  delete(tafel);
     139  // note that element is cleaned by periodentafel
     140  World::destroy();
    142141  MemoryUsageObserver::purgeInstance();
    143142  logger::purgeInstance();
Note: See TracChangeset for help on using the changeset viewer.