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 "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 namespace net { | 12 namespace net { |
13 namespace test { | 13 namespace test { |
14 namespace { | 14 namespace { |
15 | 15 |
16 TEST(QuicProtocolTest, AdjustErrorForVersion) { | 16 TEST(QuicProtocolTest, AdjustErrorForVersion) { |
17 ASSERT_EQ(8, QUIC_STREAM_LAST_ERROR) | 17 ASSERT_EQ(9, QUIC_STREAM_LAST_ERROR) |
18 << "Any additions to QuicRstStreamErrorCode require an addition to " | 18 << "Any additions to QuicRstStreamErrorCode require an addition to " |
19 << "AdjustErrorForVersion and this associated test."; | 19 << "AdjustErrorForVersion and this associated test."; |
20 | 20 |
21 // If we ever add different RST codes, we should have a test akin to the | 21 // If we ever add different RST codes, we should have a test akin to the |
22 // following. | 22 // following. |
23 // EXPECT_EQ(QUIC_RST_ACKNOWLEDGEMENT, AdjustErrorForVersion( | 23 // EXPECT_EQ(QUIC_RST_ACKNOWLEDGEMENT, AdjustErrorForVersion( |
24 // QUIC_RST_ACKNOWLEDGEMENT, | 24 // QUIC_RST_ACKNOWLEDGEMENT, |
25 // QUIC_VERSION_24)); | 25 // QUIC_VERSION_24)); |
26 } | 26 } |
27 | 27 |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 PacketNumberQueue::const_iterator it_low = queue.lower_bound(10); | 244 PacketNumberQueue::const_iterator it_low = queue.lower_bound(10); |
245 EXPECT_EQ(10u, *it_low); | 245 EXPECT_EQ(10u, *it_low); |
246 | 246 |
247 it_low = queue.lower_bound(101); | 247 it_low = queue.lower_bound(101); |
248 EXPECT_TRUE(queue.end() == it_low); | 248 EXPECT_TRUE(queue.end() == it_low); |
249 } | 249 } |
250 | 250 |
251 } // namespace | 251 } // namespace |
252 } // namespace test | 252 } // namespace test |
253 } // namespace net | 253 } // namespace net |
OLD | NEW |