#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "cc/base/math_util.h"
#include <stdint.h>
#include <cmath>
#include <limits>
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/quad_f.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/geometry/test/geometry_util.h"
#include "ui/gfx/geometry/transform.h"
namespace cc {
namespace {
TEST(MathUtilTest, ProjectionOfPerpendicularPlane) { … }
TEST(MathUtilTest, ProjectionOfAlmostPerpendicularPlane) { … }
TEST(MathUtilTest, EnclosingClippedRectHandlesInfinityY) { … }
TEST(MathUtilTest, EnclosingClippedRectHandlesNegativeInfinityX) { … }
TEST(MathUtilTest, EnclosingClippedRectHandlesInfinityXY) { … }
TEST(MathUtilTest, EnclosingClippedRectUsesCorrectInitialBounds) { … }
TEST(MathUtilTest, EnclosingClippedRectHandlesSmallPositiveW) { … }
TEST(MathUtilTest, EnclosingRectOfVerticesUsesCorrectInitialBounds) { … }
TEST(MathUtilTest, SmallestAngleBetweenVectors) { … }
TEST(MathUtilTest, VectorProjection) { … }
TEST(MathUtilTest, MapEnclosedRectWith2dAxisAlignedTransform) { … }
TEST(MathUtilTest, MapEnclosingRectWithLargeTransforms) { … }
TEST(MathUtilTest, MapEnclosingRectIgnoringError) { … }
TEST(MathUtilTest, ProjectEnclosingRectWithLargeTransforms) { … }
TEST(MathUtilTest, RoundUp) { … }
TEST(MathUtilTest, RoundUpOverflow) { … }
TEST(MathUtilTest, RoundDown) { … }
TEST(MathUtilTest, RoundDownUnderflow) { … }
#define EXPECT_SIMILAR_VALUE(x, y) …
#define EXPECT_DISSIMILAR_VALUE(x, y) …
static const float zeroish = …;
TEST(MathUtilTest, Approximate) { … }
#define EXPECT_SIMILAR_POINT_F(x, y) …
#define EXPECT_DISSIMILAR_POINT_F(x, y) …
TEST(MathUtilTest, ApproximatePointF) { … }
#define EXPECT_SIMILAR_POINT_3F(x, y) …
#define EXPECT_DISSIMILAR_POINT_3F(x, y) …
TEST(MathUtilTest, ApproximatePoint3F) { … }
TEST(MathUtilTest, MapClippedQuadDuplicateTriangle) { … }
TEST(MathUtilTest, MapClippedQuadDuplicatePoints) { … }
TEST(MathUtilTest, MapClippedQuadDuplicatePointsWrapped) { … }
TEST(MathUtilTest, MapClippedQuadDuplicateQuad) { … }
#define EXPECT_LT_LT(a, b, c) …
#define EXPECT_LE_LT(a, b, c) …
#define EXPECT_LT_LE(a, b, c) …
#define EXPECT_LE_LE(a, b, c) …
TEST(MathUtilTest, MapClippedQuadInfiniteInSomeDimensions) { … }
TEST(MathUtilTest, MapClippedQuadInfiniteInSomeDimensionsNonZero) { … }
TEST(MathUtilTest, MapClippedQuadClampInvisiblePlane) { … }
TEST(MathUtilTest, MapClippedQuadClampWholePlane) { … }
TEST(MathUtilTest, MapClippedQuadClampWholePlaneBelow) { … }
TEST(MathUtilTest, MapClippedQuadInfiniteMatrix) { … }
}
}