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

Side by Side Diff: third_party/WebKit/Source/platform/geometry/FloatQuadTest.cpp

Issue 2795713004: Rewrite references to "wtf/" to "platform/wtf/" in platform/geometry. (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/geometry/FloatQuad.h" 5 #include "platform/geometry/FloatQuad.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include "platform/wtf/text/WTFString.h"
8 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
9 #include "wtf/text/WTFString.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 TEST(FloatQuadTest, ToString) { 13 TEST(FloatQuadTest, ToString) {
14 FloatQuad quad(FloatPoint(2, 3), FloatPoint(5, 7), FloatPoint(11, 13), 14 FloatQuad quad(FloatPoint(2, 3), FloatPoint(5, 7), FloatPoint(11, 13),
15 FloatPoint(17, 19)); 15 FloatPoint(17, 19));
16 EXPECT_EQ("2,3; 5,7; 11,13; 17,19", quad.toString()); 16 EXPECT_EQ("2,3; 5,7; 11,13; 17,19", quad.toString());
17 } 17 }
18 18
19 TEST(FloatQuadTest, BoundingBox) { 19 TEST(FloatQuadTest, BoundingBox) {
(...skipping 10 matching lines...) Expand all
30 double inf = std::numeric_limits<double>::infinity(); 30 double inf = std::numeric_limits<double>::infinity();
31 FloatQuad quad(FloatPoint(-inf, 3), FloatPoint(5, inf), FloatPoint(11, 13), 31 FloatQuad quad(FloatPoint(-inf, 3), FloatPoint(5, inf), FloatPoint(11, 13),
32 FloatPoint(17, 19)); 32 FloatPoint(17, 19));
33 FloatRect rect = quad.boundingBox(); 33 FloatRect rect = quad.boundingBox();
34 EXPECT_EQ(rect.x(), std::numeric_limits<int>::min()); 34 EXPECT_EQ(rect.x(), std::numeric_limits<int>::min());
35 EXPECT_EQ(rect.y(), 3.0f); 35 EXPECT_EQ(rect.y(), 3.0f);
36 EXPECT_EQ(rect.width(), 17.0f - std::numeric_limits<int>::min()); 36 EXPECT_EQ(rect.width(), 17.0f - std::numeric_limits<int>::min());
37 EXPECT_EQ(rect.height(), std::numeric_limits<int>::max() - 3.0f); 37 EXPECT_EQ(rect.height(), std::numeric_limits<int>::max() - 3.0f);
38 } 38 }
39 } // namespace blink 39 } // namespace blink
OLDNEW
« 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