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

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

Issue 2393723004: replace NtpTime->Clock with Clock->NtpTime dependency (Closed)
Patch Set: . 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/source/clock.cc ('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 a5057897d858b34d999cc0038fd7eb28849d4c51..fe044716563dc7a36edb807db69d92a2f17fa3af 100644
--- a/webrtc/system_wrappers/source/ntp_time_unittest.cc
+++ b/webrtc/system_wrappers/source/ntp_time_unittest.cc
@@ -8,6 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "webrtc/system_wrappers/include/clock.h"
#include "webrtc/system_wrappers/include/ntp_time.h"
#include "webrtc/test/gtest.h"
@@ -45,21 +46,10 @@ TEST(NtpTimeTest, SetIsSameAs2ParameterConstructor) {
EXPECT_EQ(ntp1, ntp2);
}
-TEST(NtpTimeTest, SetCurrentIsSameAs1ParameterConstructor) {
- SimulatedClock clock(0x0123456789abcdef);
-
- NtpTime ntp1(clock);
- NtpTime ntp2;
- EXPECT_NE(ntp1, ntp2);
-
- ntp2.SetCurrent(clock);
- EXPECT_EQ(ntp1, ntp2);
-}
-
TEST(NtpTimeTest, ToMsMeansToNtpMilliseconds) {
SimulatedClock clock(0x123456789abc);
- NtpTime ntp(clock);
+ NtpTime ntp = clock.CurrentNtpTime();
EXPECT_EQ(ntp.ToMs(), Clock::NtpToMs(ntp.seconds(), ntp.fractions()));
EXPECT_EQ(ntp.ToMs(), clock.CurrentNtpInMilliseconds());
}
« no previous file with comments | « webrtc/system_wrappers/source/clock.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698