- Timestamp:
- Feb 26, 2010, 2:01:57 PM (16 years ago)
- Children:
- db6b872
- Parents:
- f467c6 (diff), dc5413 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/unittests/AnalysisCorrelationToPointUnitTest.cpp
rf467c6 rd50264 25 25 #include "periodentafel.hpp" 26 26 #include "tesselation.hpp" 27 #include "World.hpp" 28 29 #ifdef HAVE_TESTRUNNER 30 #include "UnitTestMain.hpp" 31 #endif /*HAVE_TESTRUNNER*/ 27 32 28 33 /********************************************** Test classes **************************************/ … … 52 57 53 58 // construct periodentafel 54 tafel = new periodentafel;59 tafel = World::get()->getPeriode(); 55 60 tafel->AddElement(hydrogen); 56 61 57 62 // construct molecule (tetraeder of hydrogens) 58 TestMolecule = new molecule(tafel);63 TestMolecule = World::get()->createMolecule(); 59 64 Walker = World::get()->createAtom(); 60 65 Walker->type = hydrogen; … … 77 82 CPPUNIT_ASSERT_EQUAL( TestMolecule->AtomCount, 4 ); 78 83 79 TestList = new MoleculeListClass;84 TestList = World::get()->getMolecules(); 80 85 TestMolecule->ActiveFlag = true; 81 86 TestList->insert(TestMolecule); … … 98 103 delete(binmap); 99 104 100 // remove101 delete(TestList);102 // note that all the atoms are cleaned by TestMolecule103 105 delete(point); 104 delete(tafel); 105 // note that element is cleaned by periodentafel 106 World::destroy(); 107 MemoryUsageObserver::purgeInstance(); 108 logger::purgeInstance(); 106 109 }; 107 110 … … 141 144 142 145 }; 143 144 /********************************************** Main routine **************************************/145 146 int main(int argc, char **argv)147 {148 // Get the top level suite from the registry149 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();150 151 // Adds the test to the list of test to run152 CppUnit::TextUi::TestRunner runner;153 runner.addTest( suite );154 155 // Change the default outputter to a compiler error format outputter156 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),157 std::cerr ) );158 // Run the tests.159 bool wasSucessful = runner.run();160 161 // Return error code 1 if the one of test failed.162 return wasSucessful ? 0 : 1;163 };
Note:
See TracChangeset
for help on using the changeset viewer.
