diff options
Diffstat (limited to '')
-rw-r--r-- | third_party/libwebrtc/stats/rtc_stats_report_unittest.cc | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/third_party/libwebrtc/stats/rtc_stats_report_unittest.cc b/third_party/libwebrtc/stats/rtc_stats_report_unittest.cc index ded0c27609..b3ac0a2db4 100644 --- a/third_party/libwebrtc/stats/rtc_stats_report_unittest.cc +++ b/third_party/libwebrtc/stats/rtc_stats_report_unittest.cc @@ -10,6 +10,7 @@ #include "api/stats/rtc_stats_report.h" +#include "api/stats/attribute.h" #include "api/stats/rtc_stats.h" #include "rtc_base/checks.h" #include "test/gtest.h" @@ -21,36 +22,45 @@ class RTCTestStats1 : public RTCStats { WEBRTC_RTCSTATS_DECL(); RTCTestStats1(const std::string& id, Timestamp timestamp) - : RTCStats(id, timestamp), integer("integer") {} + : RTCStats(id, timestamp) {} RTCStatsMember<int32_t> integer; }; -WEBRTC_RTCSTATS_IMPL(RTCTestStats1, RTCStats, "test-stats-1", &integer) +WEBRTC_RTCSTATS_IMPL(RTCTestStats1, + RTCStats, + "test-stats-1", + AttributeInit("integer", &integer)) class RTCTestStats2 : public RTCStats { public: WEBRTC_RTCSTATS_DECL(); RTCTestStats2(const std::string& id, Timestamp timestamp) - : RTCStats(id, timestamp), number("number") {} + : RTCStats(id, timestamp) {} RTCStatsMember<double> number; }; -WEBRTC_RTCSTATS_IMPL(RTCTestStats2, RTCStats, "test-stats-2", &number) +WEBRTC_RTCSTATS_IMPL(RTCTestStats2, + RTCStats, + "test-stats-2", + AttributeInit("number", &number)) class RTCTestStats3 : public RTCStats { public: WEBRTC_RTCSTATS_DECL(); RTCTestStats3(const std::string& id, Timestamp timestamp) - : RTCStats(id, timestamp), string("string") {} + : RTCStats(id, timestamp) {} RTCStatsMember<std::string> string; }; -WEBRTC_RTCSTATS_IMPL(RTCTestStats3, RTCStats, "test-stats-3", &string) +WEBRTC_RTCSTATS_IMPL(RTCTestStats3, + RTCStats, + "test-stats-3", + AttributeInit("string", &string)) TEST(RTCStatsReport, AddAndGetStats) { rtc::scoped_refptr<RTCStatsReport> report = |