Chromium Code Reviews| Index: third_party/WebKit/Source/platform/geometry/IntRectTest.cpp |
| diff --git a/third_party/WebKit/Source/platform/geometry/IntRectTest.cpp b/third_party/WebKit/Source/platform/geometry/IntRectTest.cpp |
| index 73f71841d787b6a74361a6fa230c0a4ffeb38fd0..7f8f37b1d73bf6c42e4e05ed3f0c1b24b63c1760 100644 |
| --- a/third_party/WebKit/Source/platform/geometry/IntRectTest.cpp |
| +++ b/third_party/WebKit/Source/platform/geometry/IntRectTest.cpp |
| @@ -5,19 +5,20 @@ |
| #include "platform/geometry/IntRect.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| -#include "wtf/text/WTFString.h" |
| namespace blink { |
| -#ifndef NDEBUG |
| -TEST(IntRectTest, ToString) |
| +TEST(IntRectTest, Formatting) |
| { |
| IntRect emptyRect = IntRect(); |
| - EXPECT_EQ(String("0,0 0x0"), emptyRect.toString()); |
| + std::ostringstream emptyRectStream; |
| + emptyRectStream << emptyRect; |
| + EXPECT_EQ("IntRect(x=0, y=0, width=0, height=0)", emptyRectStream.str()); |
| IntRect rect(1, 2, 3, 4); |
| - EXPECT_EQ(String("1,2 3x4"), rect.toString()); |
| + std::ostringstream rectStream; |
|
esprehn
2016/07/29 18:07:38
I'm not a big fan of making the tests so ugly like
|
| + rectStream << rect; |
| + EXPECT_EQ("IntRect(x=1, y=2, width=3, height=4)", rectStream.str()); |
| } |
| -#endif |
| } // namespace blink |