| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 EXPECT_EQ(ts_later, TimeMax(ts_earlier, ts_later)); | 109 EXPECT_EQ(ts_later, TimeMax(ts_earlier, ts_later)); |
| 110 EXPECT_EQ(ts_later, TimeMax(ts_later, ts_earlier)); | 110 EXPECT_EQ(ts_later, TimeMax(ts_later, ts_earlier)); |
| 111 | 111 |
| 112 // Interval | 112 // Interval |
| 113 EXPECT_EQ(100, TimeDiff(ts_later, ts_earlier)); | 113 EXPECT_EQ(100, TimeDiff(ts_later, ts_earlier)); |
| 114 EXPECT_EQ(-100, TimeDiff(ts_earlier, ts_later)); | 114 EXPECT_EQ(-100, TimeDiff(ts_earlier, ts_later)); |
| 115 } | 115 } |
| 116 | 116 |
| 117 TEST(TimeTest, TestTimeDiff64) { | 117 TEST(TimeTest, TestTimeDiff64) { |
| 118 int64_t ts_diff = 100; | 118 int64_t ts_diff = 100; |
| 119 int64_t ts_earlier = rtc::Time64(); | 119 int64_t ts_earlier = rtc::TimeMillis(); |
| 120 int64_t ts_later = ts_earlier + ts_diff; | 120 int64_t ts_later = ts_earlier + ts_diff; |
| 121 EXPECT_EQ(ts_diff, rtc::TimeDiff(ts_later, ts_earlier)); | 121 EXPECT_EQ(ts_diff, rtc::TimeDiff(ts_later, ts_earlier)); |
| 122 EXPECT_EQ(-ts_diff, rtc::TimeDiff(ts_earlier, ts_later)); | 122 EXPECT_EQ(-ts_diff, rtc::TimeDiff(ts_earlier, ts_later)); |
| 123 } | 123 } |
| 124 | 124 |
| 125 class TimestampWrapAroundHandlerTest : public testing::Test { | 125 class TimestampWrapAroundHandlerTest : public testing::Test { |
| 126 public: | 126 public: |
| 127 TimestampWrapAroundHandlerTest() {} | 127 TimestampWrapAroundHandlerTest() {} |
| 128 | 128 |
| 129 protected: | 129 protected: |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 #endif | 264 #endif |
| 265 } | 265 } |
| 266 } | 266 } |
| 267 }; | 267 }; |
| 268 | 268 |
| 269 TEST_F(TmToSeconds, TestTmToSeconds) { | 269 TEST_F(TmToSeconds, TestTmToSeconds) { |
| 270 TestTmToSeconds(100000); | 270 TestTmToSeconds(100000); |
| 271 } | 271 } |
| 272 | 272 |
| 273 } // namespace rtc | 273 } // namespace rtc |
| OLD | NEW |