Chromium Code Reviews| 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 61818cb504c516d24e11d6582b1c949bdfca04f9..44e774758b4582b365e6268a3edb4b39493f62dd 100644 |
| --- a/third_party/WebKit/Source/platform/LayoutUnitTest.cpp |
| +++ b/third_party/WebKit/Source/platform/LayoutUnitTest.cpp |
| @@ -256,4 +256,9 @@ TEST(LayoutUnitTest, LayoutUnitFloatOverflow) |
| EXPECT_EQ(intMinForLayoutUnit, LayoutUnit(-176972000.0).toInt()); |
| } |
| +TEST(LayoutUnitTest, UnaryMinusSaturated) |
|
pdr.
2016/07/20 21:03:55
What about -(LayoutUnit::min + 1)?
Xianzhu
2016/07/20 21:09:10
This won't be saturated, just a normal negative.
Xianzhu
2016/07/20 21:19:20
Converted this test case to a full UnaryMinus case
|
| +{ |
| + EXPECT_EQ(LayoutUnit::max(), -LayoutUnit::min()); |
| +} |
| + |
| } // namespace blink |