aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar nagarajan.n <nagarajan.n@samsung.com>2017-10-11 10:41:27 +0530
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-11 16:51:57 +0000
commit0ec0bf045e96dbee7af14c601950ca4437102ca8 (patch)
tree87c4f07e0745209f0479e7794a54ff7dd8da8b92
parent98395d00d25edfdaf92f89961774a0bc6d4cddea (diff)
Return error and exit from loop when there is error in compare bitmap test
This patch returns error and exit from loop when there is error in comparing bitmap test. Bug: skia:None Change-Id: If7fe9d8cf6b936bf1fb84de69e73c453a6c253de Reviewed-on: https://skia-review.googlesource.com/57600 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
-rw-r--r--tests/CodecPartialTest.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/CodecPartialTest.cpp b/tests/CodecPartialTest.cpp
index e40ff8b714..35249ac7d2 100644
--- a/tests/CodecPartialTest.cpp
+++ b/tests/CodecPartialTest.cpp
@@ -43,7 +43,10 @@ static void compare_bitmaps(skiatest::Reporter* r, const SkBitmap& bm1, const Sk
}
const size_t rowBytes = info.minRowBytes();
for (int i = 0; i < info.height(); i++) {
- REPORTER_ASSERT(r, !memcmp(bm1.getAddr(0, 0), bm2.getAddr(0, 0), rowBytes));
+ if (memcmp(bm1.getAddr(0, i), bm2.getAddr(0, i), rowBytes)) {
+ ERRORF(r, "Bitmaps have different pixels, starting on line %i!", i);
+ return;
+ }
}
}