Changeset 7471
- Timestamp:
- 09/25/07 12:18:50
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
OpenSceneGraph/trunk/examples/osgunittests/osgunittests.cpp
r7300 r7471 24 24 #include <osg/Timer> 25 25 #include <osg/io_utils> 26 27 #include <OpenThreads/Thread> 26 28 27 29 #include "UnitTestFramework.h" … … 382 384 } 383 385 386 class MyThread : public OpenThreads::Thread { 387 public: 388 void run(void) { } 389 }; 390 391 void testThreadInitAndExit() 392 { 393 std::cout<<"****** Running thread start and delete test ****** "<<std::endl; 394 395 { 396 MyThread thread; 397 thread.startThread(); 398 } 399 400 // add a sleep to allow the thread start to fall over it its going to. 401 OpenThreads::Thread::microSleep(500000); 402 403 std::cout<<"pass thread start and delete test"<<std::endl<<std::endl; 404 } 405 384 406 385 407 int main( int argc, char** argv ) … … 415 437 416 438 bool printQuatTest = false; 417 while (arguments.read("quat")) printQuatTest = true; 439 while (arguments.read("quat")) printQuatTest = true; 440 441 bool doTestThreadInitAndExit = false; 442 while (arguments.read("thread")) doTestThreadInitAndExit = true; 418 443 419 444 osg::Vec3d quat_scale(1.0,1.0,1.0); … … 502 527 } 503 528 529 if (doTestThreadInitAndExit) 530 { 531 testThreadInitAndExit(); 532 } 533 504 534 std::cout<<"****** Running tests ******"<<std::endl; 505 535
