| Index: tests/WritePixelsTest.cpp
|
| diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp
|
| index fa99d4c9ec025e0e1b23526b1c320640ad9930cb..95f790dec9eefaad80254469b1e5a65adefaa432 100644
|
| --- a/tests/WritePixelsTest.cpp
|
| +++ b/tests/WritePixelsTest.cpp
|
| @@ -224,16 +224,16 @@ static bool check_write(skiatest::Reporter* reporter, SkCanvas* canvas, const Sk
|
| bool mul = (kUnpremul_SkAlphaType == bmInfo.alphaType());
|
| SkPMColor bmpPMColor = convert_to_PMColor(bmInfo.colorType(), bmInfo.alphaType(),
|
| bmpColor8888);
|
| - bool check = checkPixel(bmpPMColor, canvasPixel, mul);
|
| - REPORTER_ASSERT(reporter, check);
|
| - if (!check) {
|
| + if (!checkPixel(bmpPMColor, canvasPixel, mul)) {
|
| + ERRORF(reporter, "Expected canvas pixel at %d, %d to be 0x%08x, got 0x%08x. "
|
| + "Write performed premul: %d", cx, cy, bmpPMColor, canvasPixel, mul);
|
| return false;
|
| }
|
| } else {
|
| - bool check;
|
| SkPMColor testColor = getCanvasColor(cx, cy);
|
| - REPORTER_ASSERT(reporter, check = (canvasPixel == testColor));
|
| - if (!check) {
|
| + if (canvasPixel != testColor) {
|
| + ERRORF(reporter, "Canvas pixel outside write rect at %d, %d changed."
|
| + " Should be 0x%08x, got 0x%08x. ", cx, cy, testColor, canvasPixel);
|
| return false;
|
| }
|
| }
|
|
|