Chromium Code Reviews| Index: base/time/time_win_unittest.cc |
| diff --git a/base/time/time_win_unittest.cc b/base/time/time_win_unittest.cc |
| index ad5e0beb40adfe7c258fc0eb3578c69bb478963a..17c722300d681d67d0010503bace12773b236585 100644 |
| --- a/base/time/time_win_unittest.cc |
| +++ b/base/time/time_win_unittest.cc |
| @@ -19,6 +19,11 @@ |
| namespace base { |
| namespace { |
| +// For TimeDelta::ConstexprInitialization |
| +constexpr int kExpectedDeltaInMilliseconds = 10; |
| +constexpr TimeDelta kConstexprTimeDelta = |
| + TimeDelta::FromMilliseconds(kExpectedDeltaInMilliseconds); |
| + |
| class MockTimeTicks : public TimeTicks { |
| public: |
| static DWORD Ticker() { |
| @@ -290,4 +295,9 @@ TEST(TimeTicks, FromQPCValue) { |
| } |
| } |
| +TEST(TimeDelta, ConstexprInitialization) { |
| + // Make sure that TimeDelta works around crbug.com/635974 |
| + EXPECT_EQ(kExpectedDeltaInMilliseconds, kConstexprTimeDelta.InMilliseconds()); |
|
Jeffrey Yasskin
2016/08/12 23:07:44
You're testing a bug in constexpr variables, so yo
|
| +} |
| + |
| } // namespace base |