| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/quic/quic_protocol.h" | 5 #include "net/quic/quic_protocol.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "net/quic/quic_utils.h" | 10 #include "net/quic/quic_utils.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 12 |
| 13 namespace net { | 13 namespace net { |
| 14 namespace test { | 14 namespace test { |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 TEST(QuicProtocolTest, AdjustErrorForVersion) { | 17 TEST(QuicProtocolTest, AdjustErrorForVersion) { |
| 18 ASSERT_EQ(13, QUIC_STREAM_LAST_ERROR) | 18 ASSERT_EQ(14, QUIC_STREAM_LAST_ERROR) |
| 19 << "Any additions to QuicRstStreamErrorCode require an addition to " | 19 << "Any additions to QuicRstStreamErrorCode require an addition to " |
| 20 << "AdjustErrorForVersion and this associated test."; | 20 << "AdjustErrorForVersion and this associated test."; |
| 21 | 21 |
| 22 // If we ever add different RST codes, we should have a test akin to the | 22 // If we ever add different RST codes, we should have a test akin to the |
| 23 // following. | 23 // following. |
| 24 // EXPECT_EQ(QUIC_RST_ACKNOWLEDGEMENT, AdjustErrorForVersion( | 24 // EXPECT_EQ(QUIC_RST_ACKNOWLEDGEMENT, AdjustErrorForVersion( |
| 25 // QUIC_RST_ACKNOWLEDGEMENT, | 25 // QUIC_RST_ACKNOWLEDGEMENT, |
| 26 // QUIC_VERSION_28)); | 26 // QUIC_VERSION_28)); |
| 27 } | 27 } |
| 28 | 28 |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 PacketNumberQueue::const_iterator it_low = queue.lower_bound(10); | 262 PacketNumberQueue::const_iterator it_low = queue.lower_bound(10); |
| 263 EXPECT_EQ(10u, *it_low); | 263 EXPECT_EQ(10u, *it_low); |
| 264 | 264 |
| 265 it_low = queue.lower_bound(101); | 265 it_low = queue.lower_bound(101); |
| 266 EXPECT_TRUE(queue.end() == it_low); | 266 EXPECT_TRUE(queue.end() == it_low); |
| 267 } | 267 } |
| 268 | 268 |
| 269 } // namespace | 269 } // namespace |
| 270 } // namespace test | 270 } // namespace test |
| 271 } // namespace net | 271 } // namespace net |
| OLD | NEW |