Tizen 2.1 base
[platform/upstream/libbullet.git] / UnitTests / cppunit / src / cppunit / RepeatedTest.cpp
1 #include <cppunit/extensions/RepeatedTest.h>
2 #include <cppunit/TestResult.h>
3
4 CPPUNIT_NS_BEGIN
5
6
7 // Counts the number of test cases that will be run by this test.
8 int
9 RepeatedTest::countTestCases() const
10
11   return TestDecorator::countTestCases() * m_timesRepeat; 
12 }
13
14
15 // Runs a repeated test
16 void 
17 RepeatedTest::run( TestResult *result )
18 {
19   for ( int n = 0; n < m_timesRepeat; n++ ) 
20   {
21     if ( result->shouldStop() )
22         break;
23
24     TestDecorator::run( result );
25   }
26 }
27
28
29 CPPUNIT_NS_END