Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1231)

Unified Diff: webrtc/system_wrappers/source/ntp_time_unittest.cc

Issue 2695683002: Change NtpTime representation to single uint64_t (Closed)
Patch Set: kRate -> kFractionsPerSecond Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/system_wrappers/include/ntp_time.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/system_wrappers/source/ntp_time_unittest.cc
diff --git a/webrtc/system_wrappers/source/ntp_time_unittest.cc b/webrtc/system_wrappers/source/ntp_time_unittest.cc
index fe044716563dc7a36edb807db69d92a2f17fa3af..9a2a9266e1b368ed4ca42f82b270ad0a16a85619 100644
--- a/webrtc/system_wrappers/source/ntp_time_unittest.cc
+++ b/webrtc/system_wrappers/source/ntp_time_unittest.cc
@@ -54,5 +54,12 @@ TEST(NtpTimeTest, ToMsMeansToNtpMilliseconds) {
EXPECT_EQ(ntp.ToMs(), clock.CurrentNtpInMilliseconds());
}
+TEST(NtpTimeTest, CanExplicitlyConvertToAndFromUint64) {
+ uint64_t untyped_time = 0x123456789;
+ NtpTime time(untyped_time);
+ EXPECT_EQ(untyped_time, static_cast<uint64_t>(time));
+ EXPECT_EQ(NtpTime(0x12345678, 0x90abcdef), NtpTime(0x1234567890abcdef));
+}
+
} // namespace
} // namespace webrtc
« no previous file with comments | « webrtc/system_wrappers/include/ntp_time.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698