Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/unittests/AnalysisPairCorrelationUnitTest.cpp

    rc78d44 r1bd79e  
    4444  TestList = NULL;
    4545  TestMolecule = NULL;
     46  hydrogen = NULL;
     47  tafel = NULL;
    4648  correlationmap = NULL;
    4749  binmap = NULL;
    4850
    49   // construct element list
    50   std::vector<element *> elements;
    51   hydrogen = World::getInstance().getPeriode()->FindElement(1);
    52   CPPUNIT_ASSERT(hydrogen != NULL && "hydrogen element not found");
    53   elements.push_back(hydrogen);
    54   elements.push_back(hydrogen);
     51  // construct element
     52  hydrogen = new element;
     53  hydrogen->Z = 1;
     54  strcpy(hydrogen->name, "hydrogen");
     55  strcpy(hydrogen->symbol, "H");
     56
     57  // construct periodentafel
     58  tafel = World::getInstance().getPeriode();
     59  tafel->AddElement(hydrogen);
    5560
    5661  // construct molecule (tetraeder of hydrogens)
     
    7479
    7580  // check that TestMolecule was correctly constructed
    76   CPPUNIT_ASSERT_EQUAL( TestMolecule->getAtomCount(), 4 );
     81  CPPUNIT_ASSERT_EQUAL( TestMolecule->AtomCount, 4 );
    7782
    7883  TestList = World::getInstance().getMolecules();
     
    8186
    8287  // init maps
    83   correlationmap = PairCorrelation( TestList, elements);
     88  correlationmap = PairCorrelation( TestList, hydrogen, hydrogen );
    8489  binmap = NULL;
    8590
     
    96101  // note that all the atoms are cleaned by TestMolecule
    97102  World::purgeInstance();
     103  MemoryUsageObserver::purgeInstance();
    98104  logger::purgeInstance();
    99105  errorLogger::purgeInstance();
Note: See TracChangeset for help on using the changeset viewer.