blob: 10f99d0890a2283df407979889d839e425fcdce1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#include <cppunit/extensions/RepeatedTest.h>
#include <cppunit/TestResult.h>
namespace CppUnit {
// Counts the number of test cases that will be run by this test.
int
RepeatedTest::countTestCases()
{
return TestDecorator::countTestCases () * m_timesRepeat;
}
// Returns the name of the test instance.
std::string
RepeatedTest::toString()
{
return TestDecorator::toString () + " (repeated)";
}
// Runs a repeated test
void
RepeatedTest::run( TestResult *result )
{
for ( int n = 0; n < m_timesRepeat; n++ )
{
if ( result->shouldStop() )
break;
TestDecorator::run( result );
}
}
} // namespace TestAssert
|