Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/unittests/manipulateAtomsTest.cpp

    r46d958 r57adc7  
    3434  {}
    3535
    36   virtual int getId(){
     36  virtual atomId_t getId(){
    3737    return id;
    3838  }
     
    4444  bool manipulated;
    4545private:
    46   int id;
     46  atomId_t id;
    4747};
    4848
     
    7878
    7979// some helper functions
    80 bool hasAll(std::vector<atom*> atoms,int min, int max, std::set<int> excluded = std::set<int>()){
     80static bool hasAll(std::vector<atom*> atoms,int min, int max, std::set<int> excluded = std::set<int>()){
    8181  for(int i=min;i<max;++i){
    8282    if(!excluded.count(i)){
     
    9595}
    9696
    97 bool hasNoDuplicates(std::vector<atom*> atoms){
     97static bool hasNoDuplicates(std::vector<atom*> atoms){
    9898  std::set<int> found;
    9999  std::vector<atom*>::iterator iter;
     
    107107}
    108108
    109 void operation(atom* _atom){
     109static void operation(atom* _atom){
    110110  AtomStub *atom = dynamic_cast<AtomStub*>(_atom);
    111111  assert(atom);
     
    153153  delete obs;
    154154}
    155 
    156 /********************************************** Main routine **************************************/
    157 
    158 int main(int argc, char **argv)
    159 {
    160   // Get the top level suite from the registry
    161   CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
    162 
    163   // Adds the test to the list of test to run
    164   CppUnit::TextUi::TestRunner runner;
    165   runner.addTest( suite );
    166 
    167   // Change the default outputter to a compiler error format outputter
    168   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.