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

Unified Diff: third_party/WebKit/Source/platform/testing/GeometryPrinters.cpp

Issue 2195903002: Add Double{Size, Point, Rect} pretty printers for logging and testing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@geometryPrettyPrinters2
Patch Set: Remove unnecessary String casts 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
« no previous file with comments | « third_party/WebKit/Source/platform/testing/GeometryPrinters.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/testing/GeometryPrinters.cpp
diff --git a/third_party/WebKit/Source/platform/testing/GeometryPrinters.cpp b/third_party/WebKit/Source/platform/testing/GeometryPrinters.cpp
index feb57e94174130df8951f37231609fc086e0b988..0eca1052cb041a514b4f44555deb61135fec464e 100644
--- a/third_party/WebKit/Source/platform/testing/GeometryPrinters.cpp
+++ b/third_party/WebKit/Source/platform/testing/GeometryPrinters.cpp
@@ -4,6 +4,9 @@
#include "platform/testing/GeometryPrinters.h"
+#include "platform/geometry/DoublePoint.h"
+#include "platform/geometry/DoubleRect.h"
+#include "platform/geometry/DoubleSize.h"
#include "platform/geometry/FloatBox.h"
#include "platform/geometry/FloatPoint.h"
#include "platform/geometry/FloatPoint3D.h"
@@ -20,6 +23,21 @@
namespace blink {
+void PrintTo(const DoublePoint& point, std::ostream* os)
+{
+ *os << point.toString();
+}
+
+void PrintTo(const DoubleRect& rect, std::ostream* os)
+{
+ *os << rect.toString();
+}
+
+void PrintTo(const DoubleSize& size, std::ostream* os)
+{
+ *os << size.toString();
+}
+
void PrintTo(const FloatBox& box, std::ostream* os)
{
*os << box.toString();
« no previous file with comments | « third_party/WebKit/Source/platform/testing/GeometryPrinters.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698