Skip to content

Commit

Permalink
Fix WebLayerImplFixedBoundsTest
Browse files Browse the repository at this point in the history
Need to use EXPECT_FLOAT_EQ instead.

BUG=

Review URL: https://codereview.chromium.org/736083004

Cr-Commit-Position: refs/heads/master@{#307519}
  • Loading branch information
hush authored and Commit bot committed Dec 9, 2014
1 parent 63839ef commit fbc420a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cc/blink/web_layer_impl_fixed_bounds_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ void CheckBoundsScaleSimple(WebLayerImplFixedBounds* layer,
original_point.y() * bounds.height / fixed_bounds.height(),
original_point.z());
// Test if the bounds scale is correctly applied in transform.
EXPECT_EQ(scaled_point,
TransformPoint(layer->layer()->transform(), original_point));
EXPECT_POINT3F_EQ(scaled_point, TransformPoint(layer->layer()->transform(),
original_point));
}

TEST(WebLayerImplFixedBoundsTest, BoundsScaleSimple) {
Expand Down
7 changes: 7 additions & 0 deletions cc/test/geometry_test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ do { \
EXPECT_NEAR((expected).height(), (actual).height(), (abs_error)); \
} while (false)

#define EXPECT_POINT3F_EQ(expected, actual) \
do { \
EXPECT_FLOAT_EQ((expected).x(), (actual).x()); \
EXPECT_FLOAT_EQ((expected).y(), (actual).y()); \
EXPECT_FLOAT_EQ((expected).z(), (actual).z()); \
} while (false)

#define EXPECT_VECTOR_EQ(expected, actual) \
do { \
EXPECT_EQ((expected).x(), (actual).x()); \
Expand Down

0 comments on commit fbc420a

Please sign in to comment.