summaryrefslogtreecommitdiffstats
path: root/base/gfx/rect_unittest.cc
diff options
context:
space:
mode:
authoravi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-05 18:04:07 +0000
committeravi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-05 18:04:07 +0000
commit66d3a8e27c79e8d8cf6f3db37f2c20226b71c7d8 (patch)
treedd1744434e0bf229fdf63fd46c220d742cf19a60 /base/gfx/rect_unittest.cc
parent4d562a7e2538a1396a4dbeae66aea33f4f4afcd3 (diff)
downloadchromium_src-66d3a8e27c79e8d8cf6f3db37f2c20226b71c7d8.zip
chromium_src-66d3a8e27c79e8d8cf6f3db37f2c20226b71c7d8.tar.gz
chromium_src-66d3a8e27c79e8d8cf6f3db37f2c20226b71c7d8.tar.bz2
Fix basic geometric types.
Review URL: http://chrome-reviews.prom.corp.google.com/1106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@381 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/gfx/rect_unittest.cc')
-rw-r--r--base/gfx/rect_unittest.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/base/gfx/rect_unittest.cc b/base/gfx/rect_unittest.cc
index c218cc9..2bfcac2 100644
--- a/base/gfx/rect_unittest.cc
+++ b/base/gfx/rect_unittest.cc
@@ -55,7 +55,7 @@ TEST(RectTest, Contains) {
{0, 0, -10, -10, 0, 0, false},
#endif // NDEBUG
};
- for (int i = 0; i < arraysize(contains_cases); ++i) {
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(contains_cases); ++i) {
const ContainsCase& value = contains_cases[i];
gfx::Rect rect(value.rect_x, value.rect_y,
value.rect_width, value.rect_height);
@@ -84,7 +84,7 @@ TEST(RectTest, Intersects) {
{ 10, 10, 10, 10, 20, 15, 10, 10, false },
{ 10, 10, 10, 10, 21, 15, 10, 10, false }
};
- for (size_t i = 0; i < arraysize(tests); ++i) {
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
gfx::Rect r1(tests[i].x1, tests[i].y1, tests[i].w1, tests[i].h1);
gfx::Rect r2(tests[i].x2, tests[i].y2, tests[i].w2, tests[i].h2);
EXPECT_EQ(tests[i].intersects, r1.Intersects(r2));
@@ -125,7 +125,7 @@ TEST(RectTest, Intersect) {
0, 0, 2, 2,
0, 0, 0, 0 }
};
- for (size_t i = 0; i < arraysize(tests); ++i) {
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
gfx::Rect r1(tests[i].x1, tests[i].y1, tests[i].w1, tests[i].h1);
gfx::Rect r2(tests[i].x2, tests[i].y2, tests[i].w2, tests[i].h2);
gfx::Rect r3(tests[i].x3, tests[i].y3, tests[i].w3, tests[i].h3);
@@ -138,7 +138,7 @@ TEST(RectTest, Intersect) {
}
TEST(RectTest, Union) {
- static const struct {
+ static const struct Test {
int x1; // rect 1
int y1;
int w1;
@@ -174,7 +174,7 @@ TEST(RectTest, Union) {
2, 2, 2, 2,
2, 2, 2, 2 }
};
- for (size_t i = 0; i < arraysize(tests); ++i) {
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
gfx::Rect r1(tests[i].x1, tests[i].y1, tests[i].w1, tests[i].h1);
gfx::Rect r2(tests[i].x2, tests[i].y2, tests[i].w2, tests[i].h2);
gfx::Rect r3(tests[i].x3, tests[i].y3, tests[i].w3, tests[i].h3);
@@ -196,7 +196,7 @@ TEST(RectTest, Equals) {
}
TEST(RectTest, AdjustToFit) {
- static const struct {
+ static const struct Test {
int x1; // source
int y1;
int w1;
@@ -226,7 +226,7 @@ TEST(RectTest, AdjustToFit) {
0, 0, 3, 3,
2, 2, 1, 1 }
};
- for (size_t i = 0; i < arraysize(tests); ++i) {
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
gfx::Rect r1(tests[i].x1, tests[i].y1, tests[i].w1, tests[i].h1);
gfx::Rect r2(tests[i].x2, tests[i].y2, tests[i].w2, tests[i].h2);
gfx::Rect r3(tests[i].x3, tests[i].y3, tests[i].w3, tests[i].h3);