コード例 #1
0
ファイル: TextTestResult.cpp プロジェクト: as2120/ZPoco
void TextTestResult::printHeader(std::ostream& stream)
{
    stream << "\n\n";
    if (wasSuccessful())
        stream << "OK ("
               << runTests() << " tests)"
               << std::endl;
    else
        stream << "!!!FAILURES!!!" << std::endl
               << "Runs: "
               << runTests ()
               << "   Failures: "
               << testFailures ()
               << "   Errors: "
               << testErrors ()
               << std::endl;
}
コード例 #2
0
void TextTestResult::printHeader (std::ostream &stream)
{
	if (wasSuccessful ())
		std::cout << "OK (" << runTests () << " tests and "
			 << testSuccesses() << " assertions in " << elapsedTime() << " ms)" << std::endl;
	else
		std::cout << std::endl
			 << "!!!FAILURES!!!" << std::endl
			 << "Test Results:" << std::endl
			 << "Run:  "
			 << runTests ()
			 << "   Failures: "
			 << testFailures ()
			 << "   Errors: "
			 << testErrors ()
			 << std::endl
			 << "(" << testSuccesses() << " assertions ran successfully in " << elapsedTime() << " ms)" << std::endl;

}