Changeset 12753 for tests/SystemQueue-tests.cc
- Timestamp:
- Mar 7, 2014, 7:16:51 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/SystemQueue-tests.cc
r12752 r12753 266 266 { 267 267 public: 268 268 269 269 /** 270 270 * typical delay time … … 275 275 #define DELAY_TIME 10 // ms 276 276 #define DELAY_MARGIN 1000 // microseconds (1/1000 ms) 277 277 278 279 /// constructor 280 SystemQueueTimingTest() : 281 SystemQueueTest() /* super constructor */, 282 sysq( SystemQueue::instance() ) 283 { 284 } 285 286 virtual void SetUp() 287 { 288 // start SystemQueue 289 sysq.run(); 290 } 291 292 293 virtual void TearDown() 294 { 295 // stop SystemQueue 296 sysq.cancel(); 297 } 298 299 SystemQueue& sysq; 278 300 }; 279 301 … … 284 306 TEST_F(SystemQueueTimingTest, DelayedCall) 285 307 { 286 SystemQueue& sysq = SystemQueue::instance();287 checkmark = false; // just to be sure..288 289 // start290 sysq.run();291 292 308 // scheduleCall 293 309 sysq.scheduleCall( … … 301 317 wait_for_checkmark(MAX_WAIT); 302 318 303 // stop304 sysq.cancel();305 306 319 EXPECT_TRUE( checkmark ) << "Deleyed function was not called within delaytime (" 307 320 << DELAY_TIME << " ms) + " << (MAX_WAIT + DELAY_MARGIN) << " microseconds.";
Note:
See TracChangeset
for help on using the changeset viewer.