diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-01 01:33:52 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-01 01:33:52 +0000 |
commit | 260000266444e0fe6e349f63b2a772c5cddc0942 (patch) | |
tree | 8029e7a3415f441d4089bfaafa72d8ca859e31a5 /skia | |
parent | cb7fa5563e0b469b582251103b716df534baecdf (diff) | |
download | chromium_src-260000266444e0fe6e349f63b2a772c5cddc0942.zip chromium_src-260000266444e0fe6e349f63b2a772c5cddc0942.tar.gz chromium_src-260000266444e0fe6e349f63b2a772c5cddc0942.tar.bz2 |
Enable some skia unittests on linux and mac.
This enables the ImageOperations.* and SkiaUtils.* test_shell_tests
on linux and mac.
Review URL: http://codereview.chromium.org/151097
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19701 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r-- | skia/ext/image_operations_unittest.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/skia/ext/image_operations_unittest.cc b/skia/ext/image_operations_unittest.cc index 3699685..b422371 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 newline at end of file +} |