本文整理汇总了C++中TestCase::test_to_run_count方法的典型用法代码示例。如果您正苦于以下问题:C++ TestCase::test_to_run_count方法的具体用法?C++ TestCase::test_to_run_count怎么用?C++ TestCase::test_to_run_count使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestCase
的用法示例。
在下文中一共展示了TestCase::test_to_run_count方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnTestCaseEnd
void SDKUnitTestListener::OnTestCaseEnd(const TestCase& test_case) {
if (!GTEST_FLAG(print_time)) return;
const std::string counts = FormatCountableNoun(test_case.test_to_run_count(), "test", "tests");
PushResult( "[----------] " );
PushResult( UTIL_VarArgs("%s from %s (%s ms total)\n\n",
counts.c_str(), test_case.name(),
internal::StreamableToString(test_case.elapsed_time()).c_str() ) );
}
示例2: OnTestCaseStart
// Called before the test case starts.
void TersePrinter::OnTestCaseStart(const TestCase& test_case)
{
if (useTerseOutput) return;
ColoredPrintf(COLOR_GREEN, "[----------] ");
printf("%s from %s\n",
FormatTestCount(test_case.test_to_run_count()).c_str(),
test_case.name());
fflush(stdout);
}
示例3: OnTestCaseStart
void SDKUnitTestListener::OnTestCaseStart(const TestCase& test_case) {
const std::string counts =
FormatCountableNoun(test_case.test_to_run_count(), "test", "tests");
PushResult( "[----------] " );
PushResult( UTIL_VarArgs("%s from %s", counts.c_str(), test_case.name()) );
if (test_case.type_param() == NULL) {
PushResult( "\n" );
} else {
PushResult( UTIL_VarArgs(", where %s = %s\n", kTypeParamLabel, test_case.type_param()) );
}
}
示例4: OnTestCaseEnd
// Called after the test case ends.
void TersePrinter::OnTestCaseEnd(const TestCase& test_case)
{
// a test case end is not printed for the following
if (useTerseOutput || !GTEST_FLAG(print_time))
return;
ColoredPrintf(COLOR_GREEN, "[----------] ");
printf("%s from %s (%s ms total)\n\n",
FormatTestCount(test_case.test_to_run_count()).c_str(),
test_case.name(),
internal::StreamableToString(test_case.elapsed_time()).c_str());
fflush(stdout);
}