Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1081)

Unified Diff: third_party/WebKit/Source/platform/geometry/LayoutRectTest.cpp

Issue 2191233002: Add platform/geometry pretty printers for logging and testing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fewer redundant spaces, more toString tests Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/geometry/LayoutRectTest.cpp
diff --git a/third_party/WebKit/Source/platform/geometry/LayoutRectTest.cpp b/third_party/WebKit/Source/platform/geometry/LayoutRectTest.cpp
index 0b98a55d3e3eaee4ccf4749361c2c0e272586c67..a6e85cebce028d74ddfc7fffe302f8586613f8bd 100644
--- a/third_party/WebKit/Source/platform/geometry/LayoutRectTest.cpp
+++ b/third_party/WebKit/Source/platform/geometry/LayoutRectTest.cpp
@@ -9,19 +9,19 @@
namespace blink {
-#ifndef NDEBUG
TEST(LayoutRectTest, ToString)
{
LayoutRect emptyRect = LayoutRect();
- EXPECT_EQ(String("0.000000,0.000000 0.000000x0.000000"), emptyRect.toString());
+ EXPECT_EQ(String("0,0 0x0"), emptyRect.toString());
LayoutRect rect(1, 2, 3, 4);
- EXPECT_EQ(String("1.000000,2.000000 3.000000x4.000000"), rect.toString());
+ EXPECT_EQ(String("1,2 3x4"), rect.toString());
LayoutRect granularRect(LayoutUnit(1.6f), LayoutUnit(2.7f), LayoutUnit(3.8f), LayoutUnit(4.9f));
- EXPECT_EQ(String("1.593750,2.687500 3.796875x4.890625"), granularRect.toString());
+ EXPECT_EQ(String("1.59375,2.6875 3.79688x4.89063"), granularRect.toString());
}
+#ifndef NDEBUG
TEST(LayoutRectTest, InclusiveIntersect)
{
LayoutRect rect(11, 12, 0, 0);
« no previous file with comments | « third_party/WebKit/Source/platform/geometry/LayoutRect.cpp ('k') | third_party/WebKit/Source/platform/geometry/LayoutSize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698