5#include "gtest/gtest.h"
7#include "flutter/impeller/geometry/size.h"
12TEST(SizeTest, SizeIsEmpty) {
13 auto nan = std::numeric_limits<Scalar>::quiet_NaN();
36TEST(SizeTest, ISizeIsEmpty) {
55 EXPECT_FALSE(
Size(20, 19).IsSquare());
56 EXPECT_FALSE(
Size(19, 20).IsSquare());
59 EXPECT_FALSE(
ISize(20, 19).IsSquare());
60 EXPECT_FALSE(
ISize(19, 20).IsSquare());
63TEST(SizeTest, MaxDimension) {
64 EXPECT_EQ(
Size(20, 20).MaxDimension(), 20);
65 EXPECT_EQ(
Size(20, 19).MaxDimension(), 20);
66 EXPECT_EQ(
Size(19, 20).MaxDimension(), 20);
67 EXPECT_EQ(
Size(20, 21).MaxDimension(), 21);
68 EXPECT_EQ(
Size(21, 20).MaxDimension(), 21);
70 EXPECT_EQ(
ISize(20, 20).MaxDimension(), 20);
71 EXPECT_EQ(
ISize(20, 19).MaxDimension(), 20);
72 EXPECT_EQ(
ISize(19, 20).MaxDimension(), 20);
73 EXPECT_EQ(
ISize(20, 21).MaxDimension(), 21);
74 EXPECT_EQ(
ISize(21, 20).MaxDimension(), 21);
77TEST(SizeTest, NegationOperator) {
78 EXPECT_EQ(-
Size(10, 20),
Size(-10, -20));
79 EXPECT_EQ(-
Size(-10, 20),
Size(10, -20));
80 EXPECT_EQ(-
Size(10, -20),
Size(-10, 20));
81 EXPECT_EQ(-
Size(-10, -20),
Size(10, 20));
TEST(AiksCanvasTest, EmptyCullRect)
bool EMSCRIPTEN_KEEPALIVE IsEmpty(const SkPath &path)
#define EXPECT_TRUE(handle)