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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback_unittest.cc

Issue 1921233002: Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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
Index: webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback_unittest.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback_unittest.cc
index 3615065351d55206956adb90c0d9d62b6713a9ac..203d70fab153a8342b043c7b8109324ceae8f028 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback_unittest.cc
@@ -11,6 +11,7 @@
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
#include <limits>
+#include <memory>
#include "testing/gtest/include/gtest/gtest.h"
@@ -43,7 +44,7 @@ class FeedbackTester {
void WithInput(const uint16_t received_seq[],
const int64_t received_ts[],
uint16_t length) {
- rtc::scoped_ptr<int64_t[]> temp_deltas;
+ std::unique_ptr<int64_t[]> temp_deltas;
if (received_ts == nullptr) {
temp_deltas.reset(new int64_t[length]);
GenerateDeltas(received_seq, length, temp_deltas.get());
@@ -136,7 +137,7 @@ class FeedbackTester {
std::vector<int64_t> expected_deltas_;
size_t expected_size_;
int64_t default_delta_;
- rtc::scoped_ptr<TransportFeedback> feedback_;
+ std::unique_ptr<TransportFeedback> feedback_;
rtc::Buffer serialized_;
};
@@ -356,7 +357,7 @@ TEST(RtcpPacketTest, TransportFeedback_Aliasing) {
TEST(RtcpPacketTest, TransportFeedback_Limits) {
// Sequence number wrap above 0x8000.
- rtc::scoped_ptr<TransportFeedback> packet(new TransportFeedback());
+ std::unique_ptr<TransportFeedback> packet(new TransportFeedback());
packet->WithBase(0, 0);
EXPECT_TRUE(packet->WithReceivedPacket(0x8000, 1000));
@@ -446,7 +447,7 @@ TEST(RtcpPacketTest, TransportFeedback_Padding) {
&mod_buffer[2], ByteReader<uint16_t>::ReadBigEndian(&mod_buffer[2]) +
((kPaddingBytes + 3) / 4));
- rtc::scoped_ptr<TransportFeedback> parsed_packet(
+ std::unique_ptr<TransportFeedback> parsed_packet(
TransportFeedback::ParseFrom(mod_buffer, kExpectedSizeWithPadding));
ASSERT_TRUE(parsed_packet.get() != nullptr);
EXPECT_EQ(kExpectedSizeWords * 4, packet.size()); // Padding not included.
@@ -468,7 +469,7 @@ TEST(RtcpPacketTest, TransportFeedback_CorrectlySplitsVectorChunks) {
feedback.WithReceivedPacket(deltas, deltas * 1000 + kLargeTimeDelta);
rtc::Buffer serialized_packet = feedback.Build();
- rtc::scoped_ptr<TransportFeedback> deserialized_packet =
+ std::unique_ptr<TransportFeedback> deserialized_packet =
TransportFeedback::ParseFrom(serialized_packet.data(),
serialized_packet.size());
EXPECT_TRUE(deserialized_packet.get() != nullptr);
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc ('k') | webrtc/modules/rtp_rtcp/source/rtcp_receiver_help.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698