- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/unittests/AnalysisPairCorrelationUnitTest.cpp
r1bd79e rc78d44 44 44 TestList = NULL; 45 45 TestMolecule = NULL; 46 hydrogen = NULL;47 tafel = NULL;48 46 correlationmap = NULL; 49 47 binmap = NULL; 50 48 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); 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); 60 55 61 56 // construct molecule (tetraeder of hydrogens) … … 79 74 80 75 // check that TestMolecule was correctly constructed 81 CPPUNIT_ASSERT_EQUAL( TestMolecule-> AtomCount, 4 );76 CPPUNIT_ASSERT_EQUAL( TestMolecule->getAtomCount(), 4 ); 82 77 83 78 TestList = World::getInstance().getMolecules(); … … 86 81 87 82 // init maps 88 correlationmap = PairCorrelation( TestList, hydrogen, hydrogen);83 correlationmap = PairCorrelation( TestList, elements); 89 84 binmap = NULL; 90 85 … … 101 96 // note that all the atoms are cleaned by TestMolecule 102 97 World::purgeInstance(); 103 MemoryUsageObserver::purgeInstance();104 98 logger::purgeInstance(); 105 99 errorLogger::purgeInstance();
Note:
See TracChangeset
for help on using the changeset viewer.