7 #include "gtest/gtest.h"
12 Point point(-30.0, 42.0);
13 EXPECT_DOUBLE_EQ(-30.0, point.
x());
14 EXPECT_DOUBLE_EQ(42.0, point.
y());
18 Size size(20.0, 42.0);
19 EXPECT_DOUBLE_EQ(20.0, size.
width());
20 EXPECT_DOUBLE_EQ(42.0, size.
height());
24 Size size(-20.0, -42.0);
25 EXPECT_DOUBLE_EQ(0.0, size.
width());
26 EXPECT_DOUBLE_EQ(0.0, size.
height());
30 Point origin(-30.0, 42.0);
31 Size size(20.0, 22.0);
32 Rect rect(origin, size);
33 EXPECT_EQ(origin, rect.
origin());
34 EXPECT_EQ(size, rect.
size());
38 Point origin(-30.0, 42.0);
39 Size size(20.0, 22.0);
40 Rect rect(origin, size);
41 EXPECT_DOUBLE_EQ(-30.0, rect.
left());
42 EXPECT_DOUBLE_EQ(42.0, rect.
top());
43 EXPECT_DOUBLE_EQ(-10.0, rect.
right());
44 EXPECT_DOUBLE_EQ(64.0, rect.
bottom());
48 Point origin(-30.0, 42.0);
49 Size size(20.0, 22.0);
50 Rect rect(origin, size);
51 EXPECT_DOUBLE_EQ(20.0, rect.
width());
52 EXPECT_DOUBLE_EQ(22.0, rect.
height());