Exemple #1
0
void TestOutput::printTestsEnded(const TestResult& result)
{
    print("\n\r");
    if (result.getFailureCount() > 0) {
        if (color_) {
            print("\033[31;1m");
        }
        print("Errors (");
        print(result.getFailureCount());
        print(" failures, ");
    }
    else {
        if (color_) {
            print("\033[32;1m");
        }
        print("OK (");
    }
    print(result.getTestCount());
    print(" tests, ");
    print(result.getRunCount());
    print(" ran, ");
    print(result.getCheckCount());
    print(" checks, ");
    print(result.getIgnoredCount());
    print(" ignored, ");
    print(result.getFilteredOutCount());
    print(" filtered out, ");
    print(result.getTotalExecutionTime());
    print(" ms)");
    if (color_) {
        print("\033[m");
    }
    print("\n\r\n\r");
}
Exemple #2
0
void TestOutput::printTestsEnded(const TestResult& result)
{
    print("\n");
    const bool anyTestFailed = result.getFailureCount() > 0;
    if (anyTestFailed) {
        if (color_) {
            print("\033[31;1m");
        }
        print("Errors (");
        print(result.getFailureCount());
        print(" failures, ");
    }
    else {
        if (color_) {
            print("\033[32;1m");
        }
        print("OK (");
    }
    print(result.getTestCount());
    print(" tests, ");
    print(result.getRunCount());
    print(" ran, ");
    print(result.getCheckCount());
    print(" checks, ");
    print(result.getIgnoredCount());
    print(" ignored, ");
    print(result.getFilteredOutCount());
    print(" filtered out, ");
    if (shuffleSeed_ != SHUFFLE_DISABLED && (verbose_ || anyTestFailed)) {
        print("shuffle seed was: ");
        print(shuffleSeed_);
        print(", ");
    }
    print(result.getTotalExecutionTime());
    print(" ms)");
    if (color_) {
        print("\033[m");
    }
    print("\n\n");

    dotCount_ = 0;
}
Exemple #3
0
void JUnitTestOutput::printCurrentTestEnded(const TestResult& result)
{
    impl_->results_.tail_->execTime_
            = result.getCurrentTestTotalExecutionTime();
    impl_->results_.tail_->checkCount_ = result.getCheckCount();
}