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

Unified Diff: net/quic/core/quic_stream_sequencer_test.cc

Issue 2464683002: adds std:: to stl types (#049) (Closed)
Patch Set: Created 4 years, 2 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: net/quic/core/quic_stream_sequencer_test.cc
diff --git a/net/quic/core/quic_stream_sequencer_test.cc b/net/quic/core/quic_stream_sequencer_test.cc
index 3903093e999fe4e7706f0b4eb36e5c1f7d2a6b72..89b8f0afdd90cb7f4a78b81984a4a39d10d0fa7d 100644
--- a/net/quic/core/quic_stream_sequencer_test.cc
+++ b/net/quic/core/quic_stream_sequencer_test.cc
@@ -87,17 +87,17 @@ class QuicStreamSequencerTest : public ::testing::Test {
sequencer_(new QuicStreamSequencer(&stream_, &clock_)) {}
// Verify that the data in first region match with the expected[0].
- bool VerifyReadableRegion(const vector<string>& expected) {
+ bool VerifyReadableRegion(const std::vector<string>& expected) {
iovec iovecs[1];
if (sequencer_->GetReadableRegions(iovecs, 1)) {
- return (VerifyIovecs(iovecs, 1, vector<string>{expected[0]}));
+ return (VerifyIovecs(iovecs, 1, std::vector<string>{expected[0]}));
}
return false;
}
// Verify that the data in each of currently readable regions match with each
// item given in |expected|.
- bool VerifyReadableRegions(const vector<string>& expected) {
+ bool VerifyReadableRegions(const std::vector<string>& expected) {
iovec iovecs[5];
size_t num_iovecs =
sequencer_->GetReadableRegions(iovecs, arraysize(iovecs));
@@ -107,7 +107,7 @@ class QuicStreamSequencerTest : public ::testing::Test {
bool VerifyIovecs(iovec* iovecs,
size_t num_iovecs,
- const vector<string>& expected) {
+ const std::vector<string>& expected) {
int start_position = 0;
for (size_t i = 0; i < num_iovecs; ++i) {
if (!VerifyIovec(iovecs[i],
@@ -390,8 +390,8 @@ TEST_F(QuicStreamSequencerTest, MutipleOffsets) {
class QuicSequencerRandomTest : public QuicStreamSequencerTest {
public:
- typedef pair<int, string> Frame;
- typedef vector<Frame> FrameList;
+ typedef std::pair<int, string> Frame;
+ typedef std::vector<Frame> FrameList;
void CreateFrames() {
int payload_size = arraysize(kPayload) - 1;
@@ -504,14 +504,14 @@ TEST_F(QuicStreamSequencerTest, MarkConsumed) {
EXPECT_EQ(9u, sequencer_->NumBytesBuffered());
// Peek into the data.
- vector<string> expected = {"abcdefghi"};
+ std::vector<string> expected = {"abcdefghi"};
ASSERT_TRUE(VerifyReadableRegions(expected));
// Consume 1 byte.
sequencer_->MarkConsumed(1);
EXPECT_EQ(1u, stream_.flow_controller()->bytes_consumed());
// Verify data.
- vector<string> expected2 = {"bcdefghi"};
+ std::vector<string> expected2 = {"bcdefghi"};
ASSERT_TRUE(VerifyReadableRegions(expected2));
EXPECT_EQ(8u, sequencer_->NumBytesBuffered());
@@ -519,7 +519,7 @@ TEST_F(QuicStreamSequencerTest, MarkConsumed) {
sequencer_->MarkConsumed(2);
EXPECT_EQ(3u, stream_.flow_controller()->bytes_consumed());
// Verify data.
- vector<string> expected3 = {"defghi"};
+ std::vector<string> expected3 = {"defghi"};
ASSERT_TRUE(VerifyReadableRegions(expected3));
EXPECT_EQ(6u, sequencer_->NumBytesBuffered());
@@ -527,7 +527,7 @@ TEST_F(QuicStreamSequencerTest, MarkConsumed) {
sequencer_->MarkConsumed(5);
EXPECT_EQ(8u, stream_.flow_controller()->bytes_consumed());
// Verify data.
- vector<string> expected4{"i"};
+ std::vector<string> expected4{"i"};
ASSERT_TRUE(VerifyReadableRegions(expected4));
EXPECT_EQ(1u, sequencer_->NumBytesBuffered());
}
@@ -540,7 +540,7 @@ TEST_F(QuicStreamSequencerTest, MarkConsumedError) {
// Peek into the data. Only the first chunk should be readable because of the
// missing data.
- vector<string> expected{"abc"};
+ std::vector<string> expected{"abc"};
ASSERT_TRUE(VerifyReadableRegions(expected));
// Now, attempt to mark consumed more data than was readable and expect the
@@ -560,7 +560,7 @@ TEST_F(QuicStreamSequencerTest, MarkConsumedWithMissingPacket) {
// Missing packet: 6, ghi.
OnFrame(9, "jkl");
- vector<string> expected = {"abcdef"};
+ std::vector<string> expected = {"abcdef"};
ASSERT_TRUE(VerifyReadableRegions(expected));
sequencer_->MarkConsumed(6);

Powered by Google App Engine
This is Rietveld 408576698