Ignore:
Timestamp:
Feb 26, 2010, 2:01:57 PM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
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.
Message:

Merge branch 'StructureRefactoring' into MenuRefactoring

Conflicts:

molecuilder/src/UIElements/TextDialog.cpp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/unittests/analysisbondsunittest.cpp

    rf467c6 rd50264  
    2525#include "molecule.hpp"
    2626#include "periodentafel.hpp"
     27
     28#ifdef HAVE_TESTRUNNER
     29#include "UnitTestMain.hpp"
     30#endif /*HAVE_TESTRUNNER*/
    2731
    2832/********************************************** Test classes **************************************/
     
    5761
    5862  // construct periodentafel
    59   tafel = new periodentafel;
     63  tafel = World::get()->getPeriode();
    6064  tafel->AddElement(hydrogen);
    6165  tafel->AddElement(carbon);
    6266
    6367  // construct molecule (tetraeder of hydrogens)
    64   TestMolecule = new molecule(tafel);
     68  TestMolecule = World::get()->createMolecule();
    6569  Walker = World::get()->createAtom();
    6670  Walker->type = hydrogen;
     
    113117
    114118  // remove molecule
    115   delete(TestMolecule);
     119  World::get()->destroyMolecule(TestMolecule);
    116120  // note that all the atoms are cleaned by TestMolecule
    117   delete(tafel);
    118   // note that element is cleaned by periodentafel
     121  World::destroy();
    119122};
    120123
     
    164167  CPPUNIT_ASSERT_EQUAL( 0. , Max );
    165168};
    166 
    167 
    168 /********************************************** Main routine **************************************/
    169 
    170 int main(int argc, char **argv)
    171 {
    172   // Get the top level suite from the registry
    173   CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
    174 
    175   // Adds the test to the list of test to run
    176   CppUnit::TextUi::TestRunner runner;
    177   runner.addTest( suite );
    178 
    179   // Change the default outputter to a compiler error format outputter
    180   runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),
    181                                                        std::cerr ) );
    182   // Run the tests.
    183   bool wasSucessful = runner.run();
    184 
    185   // Return error code 1 if the one of test failed.
    186   return wasSucessful ? 0 : 1;
    187 };
Note: See TracChangeset for help on using the changeset viewer.