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

Unified Diff: third_party/WebKit/Source/platform/geometry/FloatQuadTest.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/FloatQuadTest.cpp
diff --git a/third_party/WebKit/Source/platform/geometry/IntRectTest.cpp b/third_party/WebKit/Source/platform/geometry/FloatQuadTest.cpp
similarity index 52%
copy from third_party/WebKit/Source/platform/geometry/IntRectTest.cpp
copy to third_party/WebKit/Source/platform/geometry/FloatQuadTest.cpp
index 73f71841d787b6a74361a6fa230c0a4ffeb38fd0..20c1977e79958ca625bd43cb958a0ce9d74e24d2 100644
--- a/third_party/WebKit/Source/platform/geometry/IntRectTest.cpp
+++ b/third_party/WebKit/Source/platform/geometry/FloatQuadTest.cpp
@@ -2,22 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "platform/geometry/IntRect.h"
+#include "platform/geometry/FloatQuad.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "wtf/text/WTFString.h"
namespace blink {
-#ifndef NDEBUG
-TEST(IntRectTest, ToString)
+TEST(FloatQuadTest, ToString)
{
- IntRect emptyRect = IntRect();
- EXPECT_EQ(String("0,0 0x0"), emptyRect.toString());
-
- IntRect rect(1, 2, 3, 4);
- EXPECT_EQ(String("1,2 3x4"), rect.toString());
+ FloatQuad quad(
+ FloatPoint(2, 3),
+ FloatPoint(5, 7),
+ FloatPoint(11, 13),
+ FloatPoint(17, 19));
+ EXPECT_EQ(String("2,3; 5,7; 11,13; 17,19"), quad.toString());
}
-#endif
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/geometry/FloatQuad.cpp ('k') | third_party/WebKit/Source/platform/geometry/FloatRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698