summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_coordinates_unittest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/fx_coordinates_unittest.cpp')
-rw-r--r--core/fxcrt/fx_coordinates_unittest.cpp37
1 files changed, 33 insertions, 4 deletions
diff --git a/core/fxcrt/fx_coordinates_unittest.cpp b/core/fxcrt/fx_coordinates_unittest.cpp
index 15ee661509..7c25d0da28 100644
--- a/core/fxcrt/fx_coordinates_unittest.cpp
+++ b/core/fxcrt/fx_coordinates_unittest.cpp
@@ -197,19 +197,48 @@ TEST(CFX_FloatRect, Print) {
std::ostringstream os;
CFX_FloatRect rect;
os << rect;
- EXPECT_STREQ("rect[0x0 (0, 0)]", os.str().c_str());
+ EXPECT_STREQ("rect[w 0 x h 0 (left 0, bot 0)]", os.str().c_str());
os.str("");
rect = CFX_FloatRect(10, 20, 14, 23);
os << rect;
- EXPECT_STREQ("rect[4x3 (10, 20)]", os.str().c_str());
+ EXPECT_STREQ("rect[w 4 x h 3 (left 10, bot 20)]", os.str().c_str());
os.str("");
rect = CFX_FloatRect(10.5, 20.5, 14.75, 23.75);
os << rect;
- EXPECT_STREQ("rect[4.25x3.25 (10.5, 20.5)]", os.str().c_str());
+ EXPECT_STREQ("rect[w 4.25 x h 3.25 (left 10.5, bot 20.5)]", os.str().c_str());
}
-#endif
+
+TEST(CFX_Rect, Print) {
+ std::ostringstream os;
+ CFX_Rect rect;
+ os << rect;
+ EXPECT_STREQ("rect[w 0 x h 0 (left 0, top 0)]", os.str().c_str());
+
+ os.str("");
+ rect = CFX_Rect(10, 20, 4, 3);
+ os << rect;
+ EXPECT_STREQ("rect[w 4 x h 3 (left 10, top 20)]", os.str().c_str());
+}
+
+TEST(CFX_RectF, Print) {
+ std::ostringstream os;
+ CFX_RectF rect;
+ os << rect;
+ EXPECT_STREQ("rect[w 0 x h 0 (left 0, top 0)]", os.str().c_str());
+
+ os.str("");
+ rect = CFX_RectF(10, 20, 4, 3);
+ os << rect;
+ EXPECT_STREQ("rect[w 4 x h 3 (left 10, top 20)]", os.str().c_str());
+
+ os.str("");
+ rect = CFX_RectF(10.5, 20.5, 4.25, 3.25);
+ os << rect;
+ EXPECT_STREQ("rect[w 4.25 x h 3.25 (left 10.5, top 20.5)]", os.str().c_str());
+}
+#endif // NDEBUG
TEST(CFX_Matrix, ReverseIdentity) {
CFX_Matrix m;