OLD | NEW |
1 #include "wtf/Time.h" | 1 #include "platform/wtf/Time.h" |
2 | 2 |
3 #include "testing/gtest/include/gtest/gtest.h" | 3 #include "testing/gtest/include/gtest/gtest.h" |
4 | 4 |
5 namespace WTF { | 5 namespace WTF { |
6 namespace { | 6 namespace { |
7 | 7 |
8 TEST(TimeTicks, NumericOperations) { | 8 TEST(TimeTicks, NumericOperations) { |
9 TimeTicks zero; | 9 TimeTicks zero; |
10 ASSERT_EQ(0, zero.ToInternalValueForTesting()); | 10 ASSERT_EQ(0, zero.ToInternalValueForTesting()); |
11 | 11 |
(...skipping 10 matching lines...) Expand all Loading... |
22 | 22 |
23 Time t1 = zero + TimeDelta::FromMilliseconds(1001); | 23 Time t1 = zero + TimeDelta::FromMilliseconds(1001); |
24 ASSERT_EQ(1001000, t1.ToInternalValueForTesting()); | 24 ASSERT_EQ(1001000, t1.ToInternalValueForTesting()); |
25 | 25 |
26 Time t2 = zero + TimeDelta::FromSeconds(1); | 26 Time t2 = zero + TimeDelta::FromSeconds(1); |
27 ASSERT_EQ(TimeDelta::FromMilliseconds(1), t1 - t2); | 27 ASSERT_EQ(TimeDelta::FromMilliseconds(1), t1 - t2); |
28 } | 28 } |
29 | 29 |
30 } // namespace | 30 } // namespace |
31 } // namespace WTF | 31 } // namespace WTF |
OLD | NEW |