Changeset 9ef76a for molecuilder/src/unittests/manipulateAtomsTest.cpp
- Timestamp:
- Feb 19, 2010, 11:49:54 AM (16 years ago)
- Children:
- 01d28a
- Parents:
- 5d4edf
- File:
-
- 1 edited
-
molecuilder/src/unittests/manipulateAtomsTest.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/unittests/manipulateAtomsTest.cpp
r5d4edf r9ef76a 49 49 }; 50 50 51 class countObserver : public Observer{ 52 public: 53 countObserver() : 54 count(0) 55 {} 56 virtual ~countObserver(){} 57 58 void update(Observable *){ 59 count++; 60 } 61 62 void subjectKilled(Observable *) 63 {} 64 65 int count; 66 }; 51 67 52 68 // set up and tear down … … 131 147 } 132 148 149 void manipulateAtomsTest::testObserver(){ 150 countObserver *obs = new countObserver(); 151 World::get()->signOn(obs); 152 ManipulateAtomsProcess *proc = World::get()->manipulateAtoms(boost::bind(operation,_1),"FOO",AllAtoms() && !AtomById(ATOM_COUNT/2)); 153 proc->call(); 154 155 CPPUNIT_ASSERT_EQUAL(1,obs->count); 156 World::get()->signOff(obs); 157 delete obs; 158 } 159 133 160 /********************************************** Main routine **************************************/ 134 161
Note:
See TracChangeset
for help on using the changeset viewer.
