| 1 | // Copyright 2013 The Flutter Authors. All rights reserved. |
|---|---|
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "flutter/fml/time/time_delta.h" |
| 6 | |
| 7 | #include "gtest/gtest.h" |
| 8 | |
| 9 | namespace fml { |
| 10 | namespace { |
| 11 | |
| 12 | TEST(TimeDelta, Control) { |
| 13 | EXPECT_LT(TimeDelta::Min(), TimeDelta::Zero()); |
| 14 | EXPECT_GT(TimeDelta::Max(), TimeDelta::Zero()); |
| 15 | |
| 16 | EXPECT_GT(TimeDelta::Zero(), TimeDelta::FromMilliseconds(-100)); |
| 17 | EXPECT_LT(TimeDelta::Zero(), TimeDelta::FromMilliseconds(100)); |
| 18 | |
| 19 | EXPECT_EQ(TimeDelta::FromMilliseconds(1000), TimeDelta::FromSeconds(1)); |
| 20 | } |
| 21 | |
| 22 | } // namespace |
| 23 | } // namespace fml |
| 24 |
