- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/unittests/AnalysisCorrelationToSurfaceUnitTest.cpp
r46d958 re6fdbe 17 17 #include "AnalysisCorrelationToSurfaceUnitTest.hpp" 18 18 19 #include "World.hpp"20 19 #include "atom.hpp" 21 20 #include "boundary.hpp" … … 25 24 #include "periodentafel.hpp" 26 25 #include "tesselation.hpp" 26 #include "World.hpp" 27 28 #ifdef HAVE_TESTRUNNER 29 #include "UnitTestMain.hpp" 30 #endif /*HAVE_TESTRUNNER*/ 27 31 28 32 /********************************************** Test classes **************************************/ … … 62 66 // construct molecule (tetraeder of hydrogens) base 63 67 TestMolecule = new molecule(tafel); 64 Walker = World::get()->createAtom();68 Walker = new atom(); 65 69 Walker->type = hydrogen; 66 70 Walker->node->Init(1., 0., 1. ); 67 71 TestMolecule->AddAtom(Walker); 68 Walker = World::get()->createAtom();72 Walker = new atom(); 69 73 Walker->type = hydrogen; 70 74 Walker->node->Init(0., 1., 1. ); 71 75 TestMolecule->AddAtom(Walker); 72 Walker = World::get()->createAtom();76 Walker = new atom(); 73 77 Walker->type = hydrogen; 74 78 Walker->node->Init(1., 1., 0. ); 75 79 TestMolecule->AddAtom(Walker); 76 Walker = World::get()->createAtom();80 Walker = new atom(); 77 81 Walker->type = hydrogen; 78 82 Walker->node->Init(0., 0., 0. ); … … 95 99 96 100 // add outer atoms 97 Walker = World::get()->createAtom();101 Walker = new atom(); 98 102 Walker->type = carbon; 99 103 Walker->node->Init(4., 0., 4. ); 100 104 TestMolecule->AddAtom(Walker); 101 Walker = World::get()->createAtom();105 Walker = new atom(); 102 106 Walker->type = carbon; 103 107 Walker->node->Init(0., 4., 4. ); 104 108 TestMolecule->AddAtom(Walker); 105 Walker = World::get()->createAtom();109 Walker = new atom(); 106 110 Walker->type = carbon; 107 111 Walker->node->Init(4., 4., 0. ); 108 112 TestMolecule->AddAtom(Walker); 109 113 // add inner atoms 110 Walker = World::get()->createAtom();114 Walker = new atom(); 111 115 Walker->type = carbon; 112 116 Walker->node->Init(0.5, 0.5, 0.5 ); … … 134 138 delete(tafel); 135 139 // note that element is cleaned by periodentafel 140 World::destroy(); 141 MemoryUsageObserver::purgeInstance(); 142 logger::purgeInstance(); 136 143 }; 137 144 … … 212 219 213 220 }; 214 215 /********************************************** Main routine **************************************/216 217 int main(int argc, char **argv)218 {219 // Get the top level suite from the registry220 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();221 222 // Adds the test to the list of test to run223 CppUnit::TextUi::TestRunner runner;224 runner.addTest( suite );225 226 // Change the default outputter to a compiler error format outputter227 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),228 std::cerr ) );229 // Run the tests.230 bool wasSucessful = runner.run();231 232 // Return error code 1 if the one of test failed.233 return wasSucessful ? 0 : 1;234 };
Note:
See TracChangeset
for help on using the changeset viewer.