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

Unified Diff: webrtc/stats/rtcstats_unittest.cc

Issue 2299643002: RTCStatsCollector: timestamps updated. (Closed)
Patch Set: uint64_t -> int64_t timestamps Created 4 years, 4 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/stats/rtcstats_objects.cc ('k') | webrtc/stats/rtcstatscollector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/stats/rtcstats_unittest.cc
diff --git a/webrtc/stats/rtcstats_unittest.cc b/webrtc/stats/rtcstats_unittest.cc
index 44e75c41becd23a37e04000c05e9dc679e9a4bdd..1d4e016044dc77dadb55af5f4f1289208629cb8b 100644
--- a/webrtc/stats/rtcstats_unittest.cc
+++ b/webrtc/stats/rtcstats_unittest.cc
@@ -17,8 +17,8 @@ namespace webrtc {
class RTCTestStats : public RTCStats {
public:
- RTCTestStats(const std::string& id, double timestamp)
- : RTCStats(id, timestamp),
+ RTCTestStats(const std::string& id, int64_t timestamp_us)
+ : RTCStats(id, timestamp_us),
m_int32("mInt32"),
m_uint32("mUint32"),
m_int64("mInt64"),
@@ -72,8 +72,8 @@ const char RTCTestStats::kType[] = "test-stats";
class RTCChildStats : public RTCStats {
public:
- RTCChildStats(const std::string& id, double timestamp)
- : RTCStats(id, timestamp),
+ RTCChildStats(const std::string& id, int64_t timestamp_us)
+ : RTCStats(id, timestamp_us),
child_int("childInt") {}
WEBRTC_RTCSTATS_IMPL(RTCStats, RTCChildStats,
@@ -86,8 +86,8 @@ const char RTCChildStats::kType[] = "child-stats";
class RTCGrandChildStats : public RTCChildStats {
public:
- RTCGrandChildStats(const std::string& id, double timestamp)
- : RTCChildStats(id, timestamp),
+ RTCGrandChildStats(const std::string& id, int64_t timestamp_us)
+ : RTCChildStats(id, timestamp_us),
grandchild_int("grandchildInt") {}
WEBRTC_RTCSTATS_IMPL(RTCChildStats, RTCGrandChildStats,
@@ -99,9 +99,9 @@ class RTCGrandChildStats : public RTCChildStats {
const char RTCGrandChildStats::kType[] = "grandchild-stats";
TEST(RTCStatsTest, RTCStatsAndMembers) {
- RTCTestStats stats("testId", 42.0);
+ RTCTestStats stats("testId", 42);
EXPECT_EQ(stats.id(), "testId");
- EXPECT_EQ(stats.timestamp(), 42.0);
+ EXPECT_EQ(stats.timestamp_us(), static_cast<int64_t>(42));
std::vector<const RTCStatsMemberInterface*> members = stats.Members();
EXPECT_EQ(members.size(), static_cast<size_t>(14));
for (const RTCStatsMemberInterface* member : members) {
« no previous file with comments | « webrtc/stats/rtcstats_objects.cc ('k') | webrtc/stats/rtcstatscollector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698