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/AnalysisCorrelationToPointUnitTest.cpp

    rf467c6 rd50264  
    2525#include "periodentafel.hpp"
    2626#include "tesselation.hpp"
     27#include "World.hpp"
     28
     29#ifdef HAVE_TESTRUNNER
     30#include "UnitTestMain.hpp"
     31#endif /*HAVE_TESTRUNNER*/
    2732
    2833/********************************************** Test classes **************************************/
     
    5257
    5358  // construct periodentafel
    54   tafel = new periodentafel;
     59  tafel = World::get()->getPeriode();
    5560  tafel->AddElement(hydrogen);
    5661
    5762  // construct molecule (tetraeder of hydrogens)
    58   TestMolecule = new molecule(tafel);
     63  TestMolecule = World::get()->createMolecule();
    5964  Walker = World::get()->createAtom();
    6065  Walker->type = hydrogen;
     
    7782  CPPUNIT_ASSERT_EQUAL( TestMolecule->AtomCount, 4 );
    7883
    79   TestList = new MoleculeListClass;
     84  TestList = World::get()->getMolecules();
    8085  TestMolecule->ActiveFlag = true;
    8186  TestList->insert(TestMolecule);
     
    98103    delete(binmap);
    99104
    100   // remove
    101   delete(TestList);
    102   // note that all the atoms are cleaned by TestMolecule
    103105  delete(point);
    104   delete(tafel);
    105   // note that element is cleaned by periodentafel
     106  World::destroy();
     107  MemoryUsageObserver::purgeInstance();
     108  logger::purgeInstance();
    106109};
    107110
     
    141144
    142145};
    143 
    144 /********************************************** Main routine **************************************/
    145 
    146 int main(int argc, char **argv)
    147 {
    148   // Get the top level suite from the registry
    149   CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
    150 
    151   // Adds the test to the list of test to run
    152   CppUnit::TextUi::TestRunner runner;
    153   runner.addTest( suite );
    154 
    155   // Change the default outputter to a compiler error format outputter
    156   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.