| Index: third_party/WebKit/Source/platform/LayoutUnitTest.cpp
|
| diff --git a/third_party/WebKit/Source/platform/LayoutUnitTest.cpp b/third_party/WebKit/Source/platform/LayoutUnitTest.cpp
|
| index 4b27c33b7daa8fc4362ceee89d177120cfc002b7..84a1e51999d4bfebe7e154341a0aa92f3e5d6a16 100644
|
| --- a/third_party/WebKit/Source/platform/LayoutUnitTest.cpp
|
| +++ b/third_party/WebKit/Source/platform/LayoutUnitTest.cpp
|
| @@ -271,4 +271,28 @@ TEST(LayoutUnitTest, UnaryMinus)
|
| EXPECT_EQ(LayoutUnit::max(), -LayoutUnit::min());
|
| }
|
|
|
| +TEST(LayoutUnitTest, Formatting)
|
| +{
|
| + LayoutUnit zero;
|
| + std::ostringstream zeroStream;
|
| + zeroStream << zero;
|
| + EXPECT_EQ("0", zeroStream.str());
|
| +
|
| + std::ostringstream maxStream;
|
| + maxStream << LayoutUnit::max();
|
| + EXPECT_EQ("LayoutUnit::max(3.35544e+07)", maxStream.str());
|
| +
|
| + std::ostringstream minStream;
|
| + minStream << LayoutUnit::min();
|
| + EXPECT_EQ("LayoutUnit::min(-3.35544e+07)", minStream.str());
|
| +
|
| + std::ostringstream nearlyMaxStream;
|
| + nearlyMaxStream << LayoutUnit::nearlyMax();
|
| + EXPECT_EQ("LayoutUnit::nearlyMax(3.35544e+07)", nearlyMaxStream.str());
|
| +
|
| + std::ostringstream nearlyMinStream;
|
| + nearlyMinStream << LayoutUnit::nearlyMin();
|
| + EXPECT_EQ("LayoutUnit::nearlyMin(-3.35544e+07)", nearlyMinStream.str());
|
| +}
|
| +
|
| } // namespace blink
|
|
|