Commit a0519112 authored by Zhuoyu Qian's avatar Zhuoyu Qian Committed by Commit Bot

Rename FloatBoxTest namepsace to float_box_test

https://google.github.io/styleguide/cppguide.html#Namespace_Names
> Namespace names are all lower-case.

This CL has no behavior changes.

Bug: 889726
Change-Id: Ib4d4b483a224bb02217237d85220c3375238955a
Reviewed-on: https://chromium-review.googlesource.com/c/1293295
Commit-Queue: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601496}
parent 3e6185be
...@@ -46,11 +46,11 @@ TEST(FloatBoxTest, SimpleCreationTest) { ...@@ -46,11 +46,11 @@ TEST(FloatBoxTest, SimpleCreationTest) {
TEST(FloatBoxTest, PositionTest) { TEST(FloatBoxTest, PositionTest) {
FloatBox box(0, 0, 0, 4, 4, 4); FloatBox box(0, 0, 0, 4, 4, 4);
box.Move(FloatPoint3D(1, 2, 3)); box.Move(FloatPoint3D(1, 2, 3));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(1, 2, 3, 4, 4, 4), box); FloatBox(1, 2, 3, 4, 4, 4), box);
box.SetOrigin(FloatPoint3D(-1, -2, -3)); box.SetOrigin(FloatPoint3D(-1, -2, -3));
box.Move(FloatPoint3D(-1, -2, -3)); box.Move(FloatPoint3D(-1, -2, -3));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(-2, -4, -6, 4, 4, 4), box); FloatBox(-2, -4, -6, 4, 4, 4), box);
} }
...@@ -60,36 +60,36 @@ TEST(FloatBoxTest, CopyTest) { ...@@ -60,36 +60,36 @@ TEST(FloatBoxTest, CopyTest) {
EXPECT_EQ(box, box2); EXPECT_EQ(box, box2);
box.SetSize(FloatPoint3D(3, 3, 3)); box.SetSize(FloatPoint3D(3, 3, 3));
EXPECT_NE(box, box2); EXPECT_NE(box, box2);
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(1, 2, 3, 3, 3, 3), box); FloatBox(1, 2, 3, 3, 3, 3), box);
} }
TEST(FloatBoxTest, FlattenTest) { TEST(FloatBoxTest, FlattenTest) {
FloatBox box(1, 2, 3, 4, 4, 4); FloatBox box(1, 2, 3, 4, 4, 4);
box.Flatten(); box.Flatten();
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(1, 2, 0, 4, 4, 0), box); FloatBox(1, 2, 0, 4, 4, 0), box);
} }
TEST(FloatBoxTest, ExpandTests) { TEST(FloatBoxTest, ExpandTests) {
FloatBox box; FloatBox box;
box.ExpandTo(FloatPoint3D(10, -3, 2)); box.ExpandTo(FloatPoint3D(10, -3, 2));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(0, -3, 0, 10, 3, 2), box); FloatBox(0, -3, 0, 10, 3, 2), box);
box.ExpandTo(FloatPoint3D(-15, 6, 8)); box.ExpandTo(FloatPoint3D(-15, 6, 8));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(-15, -3, 0, 25, 9, 8), box); FloatBox(-15, -3, 0, 25, 9, 8), box);
box = FloatBox(); box = FloatBox();
box.ExpandTo(FloatPoint3D(-3, 6, 9), FloatPoint3D(-2, 10, 11)); box.ExpandTo(FloatPoint3D(-3, 6, 9), FloatPoint3D(-2, 10, 11));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(-3, 0, 0, 3, 10, 11), box); FloatBox(-3, 0, 0, 3, 10, 11), box);
box = FloatBox(); box = FloatBox();
box.ExpandTo(FloatBox(-10, -10, -10, 3, 30, 40)); box.ExpandTo(FloatBox(-10, -10, -10, 3, 30, 40));
box.ExpandTo(FloatBox(-11, 3, 50, 10, 15, 1)); box.ExpandTo(FloatBox(-11, 3, 50, 10, 15, 1));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(-11, -10, -10, 11, 30, 61), box); FloatBox(-11, -10, -10, 11, 30, 61), box);
} }
...@@ -98,13 +98,13 @@ TEST(FloatBoxTest, UnionTest) { ...@@ -98,13 +98,13 @@ TEST(FloatBoxTest, UnionTest) {
EXPECT_TRUE(box.IsEmpty()); EXPECT_TRUE(box.IsEmpty());
FloatBox unioned_box(3, 5, 6, 5, 3, 9); FloatBox unioned_box(3, 5, 6, 5, 3, 9);
box.UnionBounds(unioned_box); box.UnionBounds(unioned_box);
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, unioned_box, box); EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual, unioned_box, box);
box.UnionBounds(FloatBox()); box.UnionBounds(FloatBox());
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, unioned_box, box); EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual, unioned_box, box);
box.UnionBounds(FloatBox(0, 0, 0, 1, 1, 1)); box.UnionBounds(FloatBox(0, 0, 0, 1, 1, 1));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(0, 0, 0, 8, 8, 15), box); FloatBox(0, 0, 0, 8, 8, 15), box);
} }
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
const static float kTestEpsilon = 1e-6; const static float kTestEpsilon = 1e-6;
namespace blink { namespace blink {
namespace FloatBoxTest { namespace float_box_test {
bool ApproximatelyEqual(const float& a, const float& b) { bool ApproximatelyEqual(const float& a, const float& b) {
return geometry_test::ApproximatelyEqual(a, b, kTestEpsilon); return geometry_test::ApproximatelyEqual(a, b, kTestEpsilon);
...@@ -77,5 +77,5 @@ testing::AssertionResult AssertContains(const char* expr, ...@@ -77,5 +77,5 @@ testing::AssertionResult AssertContains(const char* expr,
return testing::AssertionSuccess(); return testing::AssertionSuccess();
} }
} // namespace FloatBoxTest } // namespace float_box_test
} // namespace blink } // namespace blink
...@@ -30,7 +30,7 @@ class FloatBox; ...@@ -30,7 +30,7 @@ class FloatBox;
bool ApproximatelyEqual(const float&, const float&); bool ApproximatelyEqual(const float&, const float&);
namespace FloatBoxTest { namespace float_box_test {
bool ApproximatelyEqual(const float&, const float&); bool ApproximatelyEqual(const float&, const float&);
bool ApproximatelyEqual(const FloatBox&, const FloatBox&); bool ApproximatelyEqual(const FloatBox&, const FloatBox&);
testing::AssertionResult AssertAlmostEqual(const char*, testing::AssertionResult AssertAlmostEqual(const char*,
...@@ -41,7 +41,7 @@ testing::AssertionResult AssertContains(const char*, ...@@ -41,7 +41,7 @@ testing::AssertionResult AssertContains(const char*,
const char*, const char*,
const FloatBox&, const FloatBox&,
const FloatBox&); const FloatBox&);
} // namespace FloatBoxTest } // namespace float_box_test
} // namespace blink } // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_GEOMETRY_FLOAT_BOX_TEST_HELPERS_H_ #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_GEOMETRY_FLOAT_BOX_TEST_HELPERS_H_
...@@ -69,7 +69,7 @@ static void EmpiricallyTestBounds(const TransformOperations& from, ...@@ -69,7 +69,7 @@ static void EmpiricallyTestBounds(const TransformOperations& from,
first_time = false; first_time = false;
} }
ASSERT_PRED_FORMAT2(FloatBoxTest::AssertContains, bounds, empirical_bounds); ASSERT_PRED_FORMAT2(float_box_test::AssertContains, bounds, empirical_bounds);
} }
TEST(TransformOperationsTest, AbsoluteAnimatedTranslatedBoundsTest) { TEST(TransformOperationsTest, AbsoluteAnimatedTranslatedBoundsTest) {
...@@ -86,25 +86,25 @@ TEST(TransformOperationsTest, AbsoluteAnimatedTranslatedBoundsTest) { ...@@ -86,25 +86,25 @@ TEST(TransformOperationsTest, AbsoluteAnimatedTranslatedBoundsTest) {
EXPECT_TRUE( EXPECT_TRUE(
to_ops.BlendedBoundsForBox(box, kIdentityOperations, 0, 1, &bounds)); to_ops.BlendedBoundsForBox(box, kIdentityOperations, 0, 1, &bounds));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(0, 0, 0, 20, 20, 210), bounds); FloatBox(0, 0, 0, 20, 20, 210), bounds);
EXPECT_TRUE( EXPECT_TRUE(
kIdentityOperations.BlendedBoundsForBox(box, to_ops, 0, 1, &bounds)); kIdentityOperations.BlendedBoundsForBox(box, to_ops, 0, 1, &bounds));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(0, 0, 0, 20, 20, 210), bounds); FloatBox(0, 0, 0, 20, 20, 210), bounds);
EXPECT_TRUE( EXPECT_TRUE(
kIdentityOperations.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds)); kIdentityOperations.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(-30, 0, 0, 40, 30, 25), bounds); FloatBox(-30, 0, 0, 40, 30, 25), bounds);
EXPECT_TRUE(to_ops.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds)); EXPECT_TRUE(to_ops.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(-30, 10, 15, 50, 20, 195), bounds); FloatBox(-30, 10, 15, 50, 20, 195), bounds);
EXPECT_TRUE(to_ops.BlendedBoundsForBox(box, from_ops, -0.5, 1.25, &bounds)); EXPECT_TRUE(to_ops.BlendedBoundsForBox(box, from_ops, -0.5, 1.25, &bounds));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(-50, 7.5, -77.5, 80, 27.5, 333.75), bounds); FloatBox(-50, 7.5, -77.5, 80, 27.5, 333.75), bounds);
} }
...@@ -148,25 +148,25 @@ TEST(TransformOperationsTest, AbsoluteAnimatedScaleBoundsTest) { ...@@ -148,25 +148,25 @@ TEST(TransformOperationsTest, AbsoluteAnimatedScaleBoundsTest) {
EXPECT_TRUE( EXPECT_TRUE(
to_ops.BlendedBoundsForBox(box, kIdentityOperations, 0, 1, &bounds)); to_ops.BlendedBoundsForBox(box, kIdentityOperations, 0, 1, &bounds));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(0, 0, 0, 50, 20, 10), bounds); FloatBox(0, 0, 0, 50, 20, 10), bounds);
EXPECT_TRUE( EXPECT_TRUE(
kIdentityOperations.BlendedBoundsForBox(box, to_ops, 0, 1, &bounds)); kIdentityOperations.BlendedBoundsForBox(box, to_ops, 0, 1, &bounds));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(0, 0, 0, 50, 20, 10), bounds); FloatBox(0, 0, 0, 50, 20, 10), bounds);
EXPECT_TRUE( EXPECT_TRUE(
kIdentityOperations.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds)); kIdentityOperations.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(0, -30, 0, 40, 40, 10), bounds); FloatBox(0, -30, 0, 40, 40, 10), bounds);
EXPECT_TRUE(to_ops.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds)); EXPECT_TRUE(to_ops.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(0, -30, 0, 50, 50, 10), bounds); FloatBox(0, -30, 0, 50, 50, 10), bounds);
EXPECT_TRUE(to_ops.BlendedBoundsForBox(box, from_ops, -0.5, 1.25, &bounds)); EXPECT_TRUE(to_ops.BlendedBoundsForBox(box, from_ops, -0.5, 1.25, &bounds));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(0, -55, 0, 52.5, 87.5, 10), bounds); FloatBox(0, -55, 0, 52.5, 87.5, 10), bounds);
} }
...@@ -217,7 +217,7 @@ TEST(TransformOperationsTest, AbsoluteAnimatedRotationBounds) { ...@@ -217,7 +217,7 @@ TEST(TransformOperationsTest, AbsoluteAnimatedRotationBounds) {
box.SetSize(FloatPoint3D(sizes[i], sizes[i], 0)); box.SetSize(FloatPoint3D(sizes[i], sizes[i], 0));
EXPECT_TRUE(to_ops.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds)); EXPECT_TRUE(to_ops.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(-2, -2, 0, 4, 4, 0), bounds); FloatBox(-2, -2, 0, 4, 4, 0), bounds);
} }
} }
...@@ -239,7 +239,7 @@ TEST(TransformOperationsTest, AbsoluteAnimatedExtremeRotationBounds) { ...@@ -239,7 +239,7 @@ TEST(TransformOperationsTest, AbsoluteAnimatedExtremeRotationBounds) {
float max = 1; float max = 1;
float size = max - min; float size = max - min;
EXPECT_TRUE(to_ops.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds)); EXPECT_TRUE(to_ops.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(min, min, min, size, size, size), bounds); FloatBox(min, min, min, size, size, size), bounds);
} }
...@@ -281,7 +281,7 @@ TEST(TransformOperationsTest, AbsoluteAnimatedOnAxisRotationBounds) { ...@@ -281,7 +281,7 @@ TEST(TransformOperationsTest, AbsoluteAnimatedOnAxisRotationBounds) {
FloatBox bounds; FloatBox bounds;
EXPECT_TRUE(to_ops.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds)); EXPECT_TRUE(to_ops.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, box, bounds); EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual, box, bounds);
} }
// This would have been best as anonymous structs, but |arraysize| // This would have been best as anonymous structs, but |arraysize|
...@@ -328,7 +328,7 @@ TEST(TransformOperationsTest, AbsoluteAnimatedProblematicAxisRotationBounds) { ...@@ -328,7 +328,7 @@ TEST(TransformOperationsTest, AbsoluteAnimatedProblematicAxisRotationBounds) {
FloatBox bounds; FloatBox bounds;
EXPECT_TRUE(to_ops.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds)); EXPECT_TRUE(to_ops.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, tests[i].expected, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual, tests[i].expected,
bounds); bounds);
} }
} }
...@@ -374,7 +374,7 @@ TEST(TransformOperationsTest, AbsoluteAnimatedPerspectiveBoundsTest) { ...@@ -374,7 +374,7 @@ TEST(TransformOperationsTest, AbsoluteAnimatedPerspectiveBoundsTest) {
FloatBox box(0, 0, 0, 10, 10, 10); FloatBox box(0, 0, 0, 10, 10, 10);
FloatBox bounds; FloatBox bounds;
to_ops.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds); to_ops.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds);
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(0, 0, 0, 20, 20, 20), bounds); FloatBox(0, 0, 0, 20, 20, 20), bounds);
from_ops.BlendedBoundsForBox(box, to_ops, -0.25, 1.25, &bounds); from_ops.BlendedBoundsForBox(box, to_ops, -0.25, 1.25, &bounds);
...@@ -383,7 +383,7 @@ TEST(TransformOperationsTest, AbsoluteAnimatedPerspectiveBoundsTest) { ...@@ -383,7 +383,7 @@ TEST(TransformOperationsTest, AbsoluteAnimatedPerspectiveBoundsTest) {
// closest the observer is 17-10=7. // closest the observer is 17-10=7.
double projected_size = 10.0 / 7.0 * 17.0; double projected_size = 10.0 / 7.0 * 17.0;
EXPECT_PRED_FORMAT2( EXPECT_PRED_FORMAT2(
FloatBoxTest::AssertAlmostEqual, float_box_test::AssertAlmostEqual,
FloatBox(0, 0, 0, projected_size, projected_size, projected_size), FloatBox(0, 0, 0, projected_size, projected_size, projected_size),
bounds); bounds);
} }
...@@ -420,19 +420,19 @@ TEST(TransformOperationsTest, AnimatedSkewBoundsTest) { ...@@ -420,19 +420,19 @@ TEST(TransformOperationsTest, AnimatedSkewBoundsTest) {
FloatBox bounds; FloatBox bounds;
to_ops.BlendedBoundsForBox(box, kIdentityOperations, 0, 1, &bounds); to_ops.BlendedBoundsForBox(box, kIdentityOperations, 0, 1, &bounds);
ASSERT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, ASSERT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(0, 0, 0, 10, 20, 10), bounds); FloatBox(0, 0, 0, 10, 20, 10), bounds);
kIdentityOperations.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds); kIdentityOperations.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds);
ASSERT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, ASSERT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(-10, 0, 0, 20, 10, 10), bounds); FloatBox(-10, 0, 0, 20, 10, 10), bounds);
to_ops.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds); to_ops.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds);
ASSERT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, ASSERT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(-10, 0, 0, 20, 20, 10), bounds); FloatBox(-10, 0, 0, 20, 20, 10), bounds);
from_ops.BlendedBoundsForBox(box, to_ops, 0, 1, &bounds); from_ops.BlendedBoundsForBox(box, to_ops, 0, 1, &bounds);
ASSERT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, ASSERT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(-10, 0, 0, 20, 20, 10), bounds); FloatBox(-10, 0, 0, 20, 20, 10), bounds);
} }
...@@ -465,7 +465,8 @@ TEST(TransformOperationsTest, NonCommutativeRotations) { ...@@ -465,7 +465,8 @@ TEST(TransformOperationsTest, NonCommutativeRotations) {
FloatBox expanded_bounds = bounds; FloatBox expanded_bounds = bounds;
expanded_bounds.ExpandTo(blended_point); expanded_bounds.ExpandTo(blended_point);
ASSERT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, bounds, expanded_bounds); ASSERT_PRED_FORMAT2(float_box_test::AssertAlmostEqual, bounds,
expanded_bounds);
} }
TEST(TransformOperationsTest, AbsoluteSequenceBoundsTest) { TEST(TransformOperationsTest, AbsoluteSequenceBoundsTest) {
...@@ -494,21 +495,21 @@ TEST(TransformOperationsTest, AbsoluteSequenceBoundsTest) { ...@@ -494,21 +495,21 @@ TEST(TransformOperationsTest, AbsoluteSequenceBoundsTest) {
FloatBox bounds; FloatBox bounds;
EXPECT_TRUE(to_ops.BlendedBoundsForBox(box, from_ops, -0.5, 1.5, &bounds)); EXPECT_TRUE(to_ops.BlendedBoundsForBox(box, from_ops, -0.5, 1.5, &bounds));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(-57, -59, -1, 76, 112, 80), bounds); FloatBox(-57, -59, -1, 76, 112, 80), bounds);
EXPECT_TRUE(to_ops.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds)); EXPECT_TRUE(to_ops.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(-32, -25, 7, 42, 44, 48), bounds); FloatBox(-32, -25, 7, 42, 44, 48), bounds);
EXPECT_TRUE( EXPECT_TRUE(
to_ops.BlendedBoundsForBox(box, kIdentityOperations, 0, 1, &bounds)); to_ops.BlendedBoundsForBox(box, kIdentityOperations, 0, 1, &bounds));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(-33, -13, 3, 57, 19, 52), bounds); FloatBox(-33, -13, 3, 57, 19, 52), bounds);
EXPECT_TRUE( EXPECT_TRUE(
kIdentityOperations.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds)); kIdentityOperations.BlendedBoundsForBox(box, from_ops, 0, 1, &bounds));
EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, EXPECT_PRED_FORMAT2(float_box_test::AssertAlmostEqual,
FloatBox(-7, -3, 2, 15, 23, 20), bounds); FloatBox(-7, -3, 2, 15, 23, 20), bounds);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment