mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Added NEON float4_t. Added float4_t unit test.
This commit is contained in:
21
3rdparty/UnitTest++/src/TestReporterStdout.cpp
vendored
21
3rdparty/UnitTest++/src/TestReporterStdout.cpp
vendored
@@ -8,6 +8,13 @@
|
||||
namespace std {}
|
||||
#endif
|
||||
|
||||
#if defined(__ANDROID__)
|
||||
# include <android/log.h>
|
||||
# define outf(format, ...) __android_log_print(ANDROID_LOG_DEBUG, "", format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define outf(format, ...) printf(format, ##__VA_ARGS__)
|
||||
#endif // defined(__ANDROID__)
|
||||
|
||||
namespace UnitTest {
|
||||
|
||||
void TestReporterStdout::ReportFailure(TestDetails const& details, char const* failure)
|
||||
@@ -18,8 +25,8 @@ void TestReporterStdout::ReportFailure(TestDetails const& details, char const* f
|
||||
char const* const errorFormat = "%s(%d): error: Failure in %s: %s\n";
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
printf(errorFormat, details.filename, details.lineNumber, details.testName, failure);
|
||||
using namespace std;
|
||||
outf(errorFormat, details.filename, details.lineNumber, details.testName, failure);
|
||||
}
|
||||
|
||||
void TestReporterStdout::ReportTestStart(TestDetails const& /*test*/)
|
||||
@@ -36,11 +43,15 @@ void TestReporterStdout::ReportSummary(int const totalTestCount, int const faile
|
||||
using namespace std;
|
||||
|
||||
if (failureCount > 0)
|
||||
printf("FAILURE: %d out of %d tests failed (%d failures).\n", failedTestCount, totalTestCount, failureCount);
|
||||
{
|
||||
outf("FAILURE: %d out of %d tests failed (%d failures).\n", failedTestCount, totalTestCount, failureCount);
|
||||
}
|
||||
else
|
||||
printf("Success: %d tests passed.\n", totalTestCount);
|
||||
{
|
||||
outf("Success: %d tests passed.\n", totalTestCount);
|
||||
}
|
||||
|
||||
printf("Test time: %.2f seconds.\n", secondsElapsed);
|
||||
outf("Test time: %.2f seconds.\n", secondsElapsed);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user