#include <array>
#include <iostream>
#include "gtest/gtest.h"
#include "impeller/geometry/matrix.h"
#include "impeller/geometry/point.h"
#include "impeller/geometry/rect.h"
#include "impeller/geometry/size.h"
#include "impeller/geometry/vector.h"
Go to the source code of this file.
Macros | |
#define | ASSERT_MATRIX_NEAR(a, b) ASSERT_PRED2(&::MatrixNear, a, b) |
#define | ASSERT_QUATERNION_NEAR(a, b) ASSERT_PRED2(&::QuaternionNear, a, b) |
#define | ASSERT_RECT_NEAR(a, b) ASSERT_PRED2(&::RectNear, a, b) |
#define | ASSERT_COLOR_NEAR(a, b) ASSERT_PRED2(&::ColorNear, a, b) |
#define | ASSERT_POINT_NEAR(a, b) ASSERT_PRED2(&::PointNear, a, b) |
#define | ASSERT_VECTOR3_NEAR(a, b) ASSERT_PRED2(&::Vector3Near, a, b) |
#define | ASSERT_VECTOR4_NEAR(a, b) ASSERT_PRED2(&::Vector4Near, a, b) |
#define | ASSERT_SIZE_NEAR(a, b) ASSERT_PRED2(&::SizeNear, a, b) |
#define | ASSERT_ARRAY_4_NEAR(a, b) ASSERT_PRED2(&::Array4Near, a, b) |
#define | ASSERT_COLOR_BUFFER_NEAR(a, b) ASSERT_PRED2(&::ColorBufferNear, a, b) |
#define | ASSERT_COLORS_NEAR(a, b) ASSERT_PRED2(&::ColorsNear, a, b) |
#define | EXPECT_MATRIX_NEAR(a, b) EXPECT_PRED2(&::MatrixNear, a, b) |
#define | EXPECT_QUATERNION_NEAR(a, b) EXPECT_PRED2(&::QuaternionNear, a, b) |
#define | EXPECT_RECT_NEAR(a, b) EXPECT_PRED2(&::RectNear, a, b) |
#define | EXPECT_COLOR_NEAR(a, b) EXPECT_PRED2(&::ColorNear, a, b) |
#define | EXPECT_POINT_NEAR(a, b) EXPECT_PRED2(&::PointNear, a, b) |
#define | EXPECT_VECTOR3_NEAR(a, b) EXPECT_PRED2(&::Vector3Near, a, b) |
#define | EXPECT_VECTOR4_NEAR(a, b) EXPECT_PRED2(&::Vector4Near, a, b) |
#define | EXPECT_SIZE_NEAR(a, b) EXPECT_PRED2(&::SizeNear, a, b) |
#define | EXPECT_ARRAY_4_NEAR(a, b) EXPECT_PRED2(&::Array4Near, a, b) |
#define | EXPECT_COLOR_BUFFER_NEAR(a, b) EXPECT_PRED2(&::ColorBufferNear, a, b) |
#define | EXPECT_COLORS_NEAR(a, b) EXPECT_PRED2(&::ColorsNear, a, b) |
Functions | |
bool | NumberNear (double a, double b) |
inline ::testing::AssertionResult | MatrixNear (impeller::Matrix a, impeller::Matrix b) |
inline ::testing::AssertionResult | QuaternionNear (impeller::Quaternion a, impeller::Quaternion b) |
inline ::testing::AssertionResult | RectNear (impeller::Rect a, impeller::Rect b) |
inline ::testing::AssertionResult | ColorNear (impeller::Color a, impeller::Color b) |
inline ::testing::AssertionResult | PointNear (impeller::Point a, impeller::Point b) |
inline ::testing::AssertionResult | Vector3Near (impeller::Vector3 a, impeller::Vector3 b) |
inline ::testing::AssertionResult | Vector4Near (impeller::Vector4 a, impeller::Vector4 b) |
inline ::testing::AssertionResult | SizeNear (impeller::Size a, impeller::Size b) |
inline ::testing::AssertionResult | Array4Near (std::array< uint8_t, 4 > a, std::array< uint8_t, 4 > b) |
inline ::testing::AssertionResult | ColorBufferNear (std::vector< uint8_t > a, std::vector< impeller::Color > b) |
inline ::testing::AssertionResult | ColorsNear (std::vector< impeller::Color > a, std::vector< impeller::Color > b) |
#define ASSERT_ARRAY_4_NEAR | ( | a, | |
b | |||
) | ASSERT_PRED2(&::Array4Near, a, b) |
Definition at line 197 of file geometry_asserts.h.
#define ASSERT_COLOR_BUFFER_NEAR | ( | a, | |
b | |||
) | ASSERT_PRED2(&::ColorBufferNear, a, b) |
Definition at line 198 of file geometry_asserts.h.
#define ASSERT_COLOR_NEAR | ( | a, | |
b | |||
) | ASSERT_PRED2(&::ColorNear, a, b) |
Definition at line 192 of file geometry_asserts.h.
#define ASSERT_COLORS_NEAR | ( | a, | |
b | |||
) | ASSERT_PRED2(&::ColorsNear, a, b) |
Definition at line 199 of file geometry_asserts.h.
#define ASSERT_MATRIX_NEAR | ( | a, | |
b | |||
) | ASSERT_PRED2(&::MatrixNear, a, b) |
Definition at line 189 of file geometry_asserts.h.
#define ASSERT_POINT_NEAR | ( | a, | |
b | |||
) | ASSERT_PRED2(&::PointNear, a, b) |
Definition at line 193 of file geometry_asserts.h.
#define ASSERT_QUATERNION_NEAR | ( | a, | |
b | |||
) | ASSERT_PRED2(&::QuaternionNear, a, b) |
Definition at line 190 of file geometry_asserts.h.
#define ASSERT_RECT_NEAR | ( | a, | |
b | |||
) | ASSERT_PRED2(&::RectNear, a, b) |
Definition at line 191 of file geometry_asserts.h.
#define ASSERT_SIZE_NEAR | ( | a, | |
b | |||
) | ASSERT_PRED2(&::SizeNear, a, b) |
Definition at line 196 of file geometry_asserts.h.
#define ASSERT_VECTOR3_NEAR | ( | a, | |
b | |||
) | ASSERT_PRED2(&::Vector3Near, a, b) |
Definition at line 194 of file geometry_asserts.h.
#define ASSERT_VECTOR4_NEAR | ( | a, | |
b | |||
) | ASSERT_PRED2(&::Vector4Near, a, b) |
Definition at line 195 of file geometry_asserts.h.
#define EXPECT_ARRAY_4_NEAR | ( | a, | |
b | |||
) | EXPECT_PRED2(&::Array4Near, a, b) |
Definition at line 209 of file geometry_asserts.h.
#define EXPECT_COLOR_BUFFER_NEAR | ( | a, | |
b | |||
) | EXPECT_PRED2(&::ColorBufferNear, a, b) |
Definition at line 210 of file geometry_asserts.h.
#define EXPECT_COLOR_NEAR | ( | a, | |
b | |||
) | EXPECT_PRED2(&::ColorNear, a, b) |
Definition at line 204 of file geometry_asserts.h.
#define EXPECT_COLORS_NEAR | ( | a, | |
b | |||
) | EXPECT_PRED2(&::ColorsNear, a, b) |
Definition at line 211 of file geometry_asserts.h.
#define EXPECT_MATRIX_NEAR | ( | a, | |
b | |||
) | EXPECT_PRED2(&::MatrixNear, a, b) |
Definition at line 201 of file geometry_asserts.h.
#define EXPECT_POINT_NEAR | ( | a, | |
b | |||
) | EXPECT_PRED2(&::PointNear, a, b) |
Definition at line 205 of file geometry_asserts.h.
#define EXPECT_QUATERNION_NEAR | ( | a, | |
b | |||
) | EXPECT_PRED2(&::QuaternionNear, a, b) |
Definition at line 202 of file geometry_asserts.h.
#define EXPECT_RECT_NEAR | ( | a, | |
b | |||
) | EXPECT_PRED2(&::RectNear, a, b) |
Definition at line 203 of file geometry_asserts.h.
#define EXPECT_SIZE_NEAR | ( | a, | |
b | |||
) | EXPECT_PRED2(&::SizeNear, a, b) |
Definition at line 208 of file geometry_asserts.h.
#define EXPECT_VECTOR3_NEAR | ( | a, | |
b | |||
) | EXPECT_PRED2(&::Vector3Near, a, b) |
Definition at line 206 of file geometry_asserts.h.
#define EXPECT_VECTOR4_NEAR | ( | a, | |
b | |||
) | EXPECT_PRED2(&::Vector4Near, a, b) |
Definition at line 207 of file geometry_asserts.h.
inline ::testing::AssertionResult Array4Near | ( | std::array< uint8_t, 4 > | a, |
std::array< uint8_t, 4 > | b | ||
) |
Definition at line 143 of file geometry_asserts.h.
References impeller::saturated::b, and NumberNear().
inline ::testing::AssertionResult ColorBufferNear | ( | std::vector< uint8_t > | a, |
std::vector< impeller::Color > | b | ||
) |
Definition at line 152 of file geometry_asserts.h.
References impeller::saturated::b, and NumberNear().
inline ::testing::AssertionResult ColorNear | ( | impeller::Color | a, |
impeller::Color | b | ||
) |
Definition at line 100 of file geometry_asserts.h.
References impeller::Color::alpha, impeller::saturated::b, impeller::Color::blue, impeller::Color::green, NumberNear(), and impeller::Color::red.
inline ::testing::AssertionResult ColorsNear | ( | std::vector< impeller::Color > | a, |
std::vector< impeller::Color > | b | ||
) |
Definition at line 172 of file geometry_asserts.h.
References impeller::saturated::b, and NumberNear().
inline ::testing::AssertionResult MatrixNear | ( | impeller::Matrix | a, |
impeller::Matrix | b | ||
) |
Definition at line 56 of file geometry_asserts.h.
References impeller::saturated::b, impeller::Matrix::m, and NumberNear().
Referenced by impeller::testing::TEST().
|
inline |
Definition at line 18 of file geometry_asserts.h.
References impeller::saturated::b.
Referenced by Array4Near(), ColorBufferNear(), ColorNear(), ColorsNear(), MatrixNear(), PointNear(), QuaternionNear(), RectNear(), SizeNear(), impeller::testing::TEST_P(), Vector3Near(), and Vector4Near().
inline ::testing::AssertionResult PointNear | ( | impeller::Point | a, |
impeller::Point | b | ||
) |
Definition at line 109 of file geometry_asserts.h.
References impeller::saturated::b, NumberNear(), impeller::TPoint< T >::x, and impeller::TPoint< T >::y.
Referenced by SolidVerticesNear(), and TextureVerticesNear().
inline ::testing::AssertionResult QuaternionNear | ( | impeller::Quaternion | a, |
impeller::Quaternion | b | ||
) |
Definition at line 80 of file geometry_asserts.h.
References impeller::saturated::b, NumberNear(), impeller::Quaternion::w, impeller::Quaternion::x, impeller::Quaternion::y, and impeller::Quaternion::z.
inline ::testing::AssertionResult RectNear | ( | impeller::Rect | a, |
impeller::Rect | b | ||
) |
Definition at line 89 of file geometry_asserts.h.
References impeller::saturated::b, impeller::TRect< T >::GetBottom(), impeller::TRect< T >::GetLeft(), impeller::TRect< T >::GetRight(), impeller::TRect< T >::GetTop(), and NumberNear().
Referenced by impeller::testing::TEST(), and impeller::testing::TEST_P().
inline ::testing::AssertionResult SizeNear | ( | impeller::Size | a, |
impeller::Size | b | ||
) |
Definition at line 136 of file geometry_asserts.h.
References impeller::saturated::b, impeller::TSize< T >::height, NumberNear(), and impeller::TSize< T >::width.
inline ::testing::AssertionResult Vector3Near | ( | impeller::Vector3 | a, |
impeller::Vector3 | b | ||
) |
Definition at line 118 of file geometry_asserts.h.
References impeller::saturated::b, NumberNear(), impeller::Vector3::x, impeller::Vector3::y, and impeller::Vector3::z.
inline ::testing::AssertionResult Vector4Near | ( | impeller::Vector4 | a, |
impeller::Vector4 | b | ||
) |
Definition at line 127 of file geometry_asserts.h.
References impeller::saturated::b, NumberNear(), impeller::Vector4::w, impeller::Vector4::x, impeller::Vector4::y, and impeller::Vector4::z.