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