📄 repeatedtest.cpp
字号:
#include <cppunit/extensions/RepeatedTest.h>#include <cppunit/TestResult.h>namespace CppUnit {// Counts the number of test cases that will be run by this test.intRepeatedTest::countTestCases() const{ return TestDecorator::countTestCases () * m_timesRepeat; }// Returns the name of the test instance. std::string RepeatedTest::toString() const{ return TestDecorator::toString () + " (repeated)"; }// Runs a repeated testvoid RepeatedTest::run( TestResult *result ){ for ( int n = 0; n < m_timesRepeat; n++ ) { if ( result->shouldStop() ) break; TestDecorator::run( result ); }}} // namespace TestAssert
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -