Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Unified Diff: tests/MathTest.cpp

Issue 132843002: Add REPORTF test macro. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: factor Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/MathTest.cpp
diff --git a/tests/MathTest.cpp b/tests/MathTest.cpp
index 8cba67dd3d49528db789aceecdf0fca05e0995bc..2756dc428c78442c888cefc30025857169d9efe4 100644
--- a/tests/MathTest.cpp
+++ b/tests/MathTest.cpp
@@ -225,10 +225,9 @@ static bool equal_float_native_skia(float x, uint32_t ni, uint32_t si) {
static void assert_float_equal(skiatest::Reporter* reporter, const char op[],
float x, uint32_t ni, uint32_t si) {
if (!equal_float_native_skia(x, ni, si)) {
- SkString desc;
- uint32_t xi = SkFloat2Bits(x);
- desc.printf("%s float %g bits %x native %x skia %x\n", op, x, xi, ni, si);
- reporter->reportFailed(desc);
+ REPORTF(reporter,
+ ("%s float %g bits %x native %x skia %x\n",
+ op, x, SkFloat2Bits(x), ni, si));
}
}
« no previous file with comments | « tests/ImageDecodingTest.cpp ('k') | tests/PathCoverageTest.cpp » ('j') | tests/Test.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698