Changeset dc5413 for molecuilder/src/unittests/atomsCalculationTest.cpp
- Timestamp:
- Feb 26, 2010, 1:57:01 PM (16 years ago)
- Children:
- 78b9d9, d50264
- Parents:
- e65cc0 (diff), 45cc89 (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/atomsCalculationTest.cpp
re65cc0 rdc5413 63 63 64 64 // some helper functions 65 bool hasAll(std::vector<int> ids,int min, int max, std::set<int> excluded = std::set<int>()){65 static bool hasAll(std::vector<int> ids,int min, int max, std::set<int> excluded = std::set<int>()){ 66 66 for(int i=min;i<max;++i){ 67 67 if(!excluded.count(i)){ … … 80 80 } 81 81 82 bool hasNoDuplicates(std::vector<int> ids){82 static bool hasNoDuplicates(std::vector<int> ids){ 83 83 std::set<int> found; 84 84 std::vector<int>::iterator iter; … … 92 92 } 93 93 94 void operation(atom* _atom){94 static void operation(atom* _atom){ 95 95 AtomStub *atom = dynamic_cast<AtomStub*>(_atom); 96 96 assert(atom); … … 116 116 CPPUNIT_ASSERT_EQUAL((size_t)(ATOM_COUNT-1),allIds.size()); 117 117 } 118 119 /********************************************** Main routine **************************************/120 121 int main(int argc, char **argv)122 {123 // Get the top level suite from the registry124 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();125 126 // Adds the test to the list of test to run127 CppUnit::TextUi::TestRunner runner;128 runner.addTest( suite );129 130 // Change the default outputter to a compiler error format outputter131 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),132 std::cerr ) );133 // Run the tests.134 bool wasSucessful = runner.run();135 136 // Return error code 1 if the one of test failed.137 return wasSucessful ? 0 : 1;138 };
Note:
See TracChangeset
for help on using the changeset viewer.
