Changeset dc5413 for molecuilder/src/unittests/manipulateAtomsTest.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
-
molecuilder/src/unittests/manipulateAtomsTest.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/unittests/manipulateAtomsTest.cpp
re65cc0 rdc5413 78 78 79 79 // some helper functions 80 bool hasAll(std::vector<atom*> atoms,int min, int max, std::set<int> excluded = std::set<int>()){80 static bool hasAll(std::vector<atom*> atoms,int min, int max, std::set<int> excluded = std::set<int>()){ 81 81 for(int i=min;i<max;++i){ 82 82 if(!excluded.count(i)){ … … 95 95 } 96 96 97 bool hasNoDuplicates(std::vector<atom*> atoms){97 static bool hasNoDuplicates(std::vector<atom*> atoms){ 98 98 std::set<int> found; 99 99 std::vector<atom*>::iterator iter; … … 107 107 } 108 108 109 void operation(atom* _atom){109 static void operation(atom* _atom){ 110 110 AtomStub *atom = dynamic_cast<AtomStub*>(_atom); 111 111 assert(atom); … … 153 153 delete obs; 154 154 } 155 156 /********************************************** Main routine **************************************/157 158 int main(int argc, char **argv)159 {160 // Get the top level suite from the registry161 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();162 163 // Adds the test to the list of test to run164 CppUnit::TextUi::TestRunner runner;165 runner.addTest( suite );166 167 // Change the default outputter to a compiler error format outputter168 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),169 std::cerr ) );170 // Run the tests.171 bool wasSucessful = runner.run();172 173 // Return error code 1 if the one of test failed.174 return wasSucessful ? 0 : 1;175 };
Note:
See TracChangeset
for help on using the changeset viewer.
