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

Unified Diff: third_party/WebKit/Source/platform/geometry/FloatPoint3D.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: Adjust tests to work around uninteresting cross-platform differences Created 4 years, 5 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/FloatPoint3D.cpp
diff --git a/third_party/WebKit/Source/platform/geometry/FloatPoint3D.cpp b/third_party/WebKit/Source/platform/geometry/FloatPoint3D.cpp
index 19dd85be19b5f27fa7318dc0135cb0fdf76a6ef6..6d821db5ad18259225ca8a91290242d7d4513fa0 100644
--- a/third_party/WebKit/Source/platform/geometry/FloatPoint3D.cpp
+++ b/third_party/WebKit/Source/platform/geometry/FloatPoint3D.cpp
@@ -23,6 +23,7 @@
#include "wtf/MathExtras.h"
#include <math.h>
+#include <ostream> // NOLINT
namespace blink {
@@ -51,5 +52,14 @@ float FloatPoint3D::angleBetween(const FloatPoint3D& y) const
return 0;
}
+std::ostream& operator<<(std::ostream& os, const FloatPoint3D& point)
+{
+ os << "FloatPoint3D("
+ << "x=" << point.x() << ", "
+ << "y=" << point.y() << ", "
+ << "z=" << point.z() << ")";
+ return os;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698