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

Unified Diff: skia/ext/image_operations_unittest.cc

Issue 151097: Enable some skia unittests on linux and mac. (Closed)
Patch Set: Created 11 years, 6 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
« no previous file with comments | « no previous file | webkit/tools/test_shell/test_shell.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/image_operations_unittest.cc
diff --git a/skia/ext/image_operations_unittest.cc b/skia/ext/image_operations_unittest.cc
index 36996858d3be49f6fd1c73f501499e4d84b7fd1c..b42237128d2ebaf027959642da896cc0994a6d22 100644
--- a/skia/ext/image_operations_unittest.cc
+++ b/skia/ext/image_operations_unittest.cc
@@ -178,13 +178,13 @@ TEST(ImageOperations, CreateBlendedBitmap) {
for (int y = 0; y < src_h; y++) {
for (int x = 0; x < src_w; x++) {
int i = y * src_w + x;
- EXPECT_EQ((255 + ((255 - i) % 255)) / 2,
+ EXPECT_EQ(static_cast<unsigned int>((255 + ((255 - i) % 255)) / 2),
SkColorGetA(*blended.getAddr32(x, y)));
- EXPECT_EQ(i % 255 / 2,
+ EXPECT_EQ(static_cast<unsigned int>(i % 255 / 2),
SkColorGetR(*blended.getAddr32(x, y)));
- EXPECT_EQ(((i * 2) % 255 + (i * 4) % 255) / 2,
+ EXPECT_EQ((static_cast<unsigned int>((i * 2) % 255 + (i * 4) % 255) / 2),
SkColorGetG(*blended.getAddr32(x, y)));
- EXPECT_EQ(i % 255 / 2,
+ EXPECT_EQ(static_cast<unsigned int>(i % 255 / 2),
SkColorGetB(*blended.getAddr32(x, y)));
}
}
@@ -223,7 +223,7 @@ TEST(ImageOperations, CreateMaskedBitmap) {
SkColor masked_pixel = *masked.getAddr32(x, y);
// Test that the alpha is equal.
- int alpha = (alpha_pixel & 0xff000000) >> SK_A32_SHIFT;
+ unsigned int alpha = (alpha_pixel & 0xff000000) >> SK_A32_SHIFT;
EXPECT_EQ(alpha, (masked_pixel & 0xff000000) >> SK_A32_SHIFT);
// Test that the colors are right - SkBitmaps have premultiplied alpha,
@@ -511,4 +511,4 @@ TEST(ImageOperations, DownsampleByTwoUntilSize) {
// The result should be divided in half 100x43 -> 50x22 -> 25x11
EXPECT_EQ(25, result.width());
EXPECT_EQ(11, result.height());
-}
+}
« no previous file with comments | « no previous file | webkit/tools/test_shell/test_shell.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698