Chromium Code Reviews| Index: tests/ImageDecodingTest.cpp |
| diff --git a/tests/ImageDecodingTest.cpp b/tests/ImageDecodingTest.cpp |
| index c74bb35ccf43927f4e8f4544f82b5b2b7e077c50..148a21baffe3436396cdac3c5be655f96b01e765 100644 |
| --- a/tests/ImageDecodingTest.cpp |
| +++ b/tests/ImageDecodingTest.cpp |
| @@ -443,13 +443,13 @@ static void test_options(skiatest::Reporter* reporter, |
| } |
| // If we get here, it's a failure and we will need more |
| // information about why it failed. |
| - reporter->reportFailed(SkStringPrintf( |
| - "Bounds decode failed " |
| - "[sampleSize=%d dither=%s colorType=%s %s] %s:%d", |
| - opts.fSampleSize, (opts.fDitherImage ? "yes" : "no"), |
| - (opts.fUseRequestedColorType |
| - ? SkColorType_to_string(opts.fRequestedColorType) : "(none)"), |
| - path.c_str(), __FILE__, __LINE__)); |
| + const char* colorTypeDesc |
| + = opts.fUseRequestedColorType |
|
bungeman-skia
2014/01/09 23:43:56
With the line breaks like this, this is really har
hal.canary
2014/01/10 13:20:33
Fixed.
|
| + ? SkColorType_to_string(opts.fRequestedColorType) : "(none)"; |
| + REPORTF(reporter, |
| + ("Bounds decode failed [sampleSize=%d dither=%s colorType=%s" |
| + " %s]", opts.fSampleSize, (opts.fDitherImage ? "yes" : "no"), |
| + colorTypeDesc, path.c_str())); |
| return; |
| } |
| #if defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_UNIX) |
| @@ -463,13 +463,13 @@ static void test_options(skiatest::Reporter* reporter, |
| #endif // SK_BUILD_FOR_ANDROID || SK_BUILD_FOR_UNIX |
| SkAutoLockPixels alp(bm); |
| if (bm.getPixels() == NULL) { |
| - reporter->reportFailed(SkStringPrintf( |
| - "Pixel decode failed " |
| - "[sampleSize=%d dither=%s colorType=%s %s] %s:%d", |
| - opts.fSampleSize, (opts.fDitherImage ? "yes" : "no"), |
| - (opts.fUseRequestedColorType |
| - ? SkColorType_to_string(opts.fRequestedColorType) : "(none)"), |
| - path.c_str(), __FILE__, __LINE__)); |
| + const char* colorTypeDesc |
| + = opts.fUseRequestedColorType |
| + ? SkColorType_to_string(opts.fRequestedColorType) : "(none)"; |
| + REPORTF(reporter, |
| + ("Pixel decode failed [sampleSize=%d dither=%s colorType=%s" |
| + " %s]", opts.fSampleSize, (opts.fDitherImage ? "yes" : "no"), |
| + colorTypeDesc, path.c_str())); |
| return; |
| } |
| @@ -496,14 +496,15 @@ static void test_options(skiatest::Reporter* reporter, |
| } |
| } |
| if (pixelErrors != 0) { |
| - reporter->reportFailed(SkStringPrintf( |
| - "Pixel-level mismatch (%d of %d) [sampleSize=%d " |
| - "dither=%s colorType=%s %s] %s:%d", |
| - pixelErrors, kExpectedHeight * kExpectedWidth, |
| - opts.fSampleSize, (opts.fDitherImage ? "yes" : "no"), |
| - (opts.fUseRequestedColorType |
| - ? SkColorType_to_string(opts.fRequestedColorType) |
| - : "(none)"), path.c_str(), __FILE__, __LINE__)); |
| + const char* colorTypeDesc |
| + = opts.fUseRequestedColorType |
| + ? SkColorType_to_string(opts.fRequestedColorType) : "(none)"; |
| + REPORTF(reporter, |
| + ("Pixel-level mismatch (%d of %d) [sampleSize=%d " |
| + "dither=%s colorType=%s %s]", |
| + pixelErrors, kExpectedHeight * kExpectedWidth, |
| + opts.fSampleSize, (opts.fDitherImage ? "yes" : "no"), |
| + colorTypeDesc, path.c_str())); |
| } |
| } |
| } |