25bool FloatAlmostEqual(
float a,
float b) {
27 return ::testing::FloatLE(
"a",
"b",
a,
b) &&
28 ::testing::FloatLE(
"b",
"a",
b,
a);
37 if (FloatAlmostEqual(lhs.
x(), rhs.
x()) &&
38 FloatAlmostEqual(lhs.
y(), rhs.
y())) {
39 return ::testing::AssertionSuccess();
41 return ::testing::AssertionFailure()
42 <<
"Value of: " << rhs_expr <<
"\n Actual: " << rhs.
ToString()
43 <<
"\nExpected: " << lhs_expr <<
"\nWhich is: " << lhs.
ToString();
50 if (FloatAlmostEqual(lhs.
x(), rhs.
x()) &&
51 FloatAlmostEqual(lhs.
y(), rhs.
y()) &&
54 return ::testing::AssertionSuccess();
56 return ::testing::AssertionFailure()
57 <<
"Value of: " << rhs_expr <<
"\n Actual: " << rhs.
ToString()
58 <<
"\nExpected: " << lhs_expr <<
"\nWhich is: " << lhs.
ToString();
65 if (FloatAlmostEqual(lhs.
width(), rhs.
width()) &&
67 return ::testing::AssertionSuccess();
69 return ::testing::AssertionFailure()
70 <<
"Value of: " << rhs_expr <<
"\n Actual: " << rhs.
ToString()
71 <<
"\nExpected: " << lhs_expr <<
"\nWhich is: " << lhs.
ToString();
83 *os <<
rect.ToString();
87 *os <<
rect.ToString();
91 *os <<
size.ToString();
95 *os <<
size.ToString();
constexpr float x() const
std::string ToString() const
constexpr float y() const
std::string ToString() const
constexpr float y() const
constexpr float width() const
std::string ToString() const
constexpr float height() const
constexpr float x() const
std::string ToString() const
constexpr float height() const
constexpr float width() const
std::string ToString() const
std::string ToString() const
sk_sp< SkBlender > blender SkRect rect
::testing::AssertionResult AssertRectFloatEqual(const char *lhs_expr, const char *rhs_expr, const RectF &lhs, const RectF &rhs)
void PrintTo(const Point &point, ::std::ostream *os)
::testing::AssertionResult AssertPointFloatEqual(const char *lhs_expr, const char *rhs_expr, const PointF &lhs, const PointF &rhs)
::testing::AssertionResult AssertSizeFFloatEqual(const char *lhs_expr, const char *rhs_expr, const SizeF &lhs, const SizeF &rhs)
constexpr size_t size(const T(&array)[N]) noexcept
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)