| 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/core/quic_protocol.h" | 5 #include "net/quic/core/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/core/quic_flags.h" | 10 #include "net/quic/core/quic_flags.h" |
| 11 #include "net/quic/core/quic_utils.h" | 11 #include "net/quic/core/quic_utils.h" |
| 12 #include "net/quic/test_tools/quic_test_utils.h" | 12 #include "net/quic/test_tools/quic_test_utils.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 namespace net { | 15 namespace net { |
| 16 namespace test { | 16 namespace test { |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 TEST(QuicProtocolTest, AdjustErrorForVersion) { | 19 TEST(QuicProtocolTest, AdjustErrorForVersion) { |
| 20 ASSERT_EQ(14, QUIC_STREAM_LAST_ERROR) | 20 ASSERT_EQ(15, QUIC_STREAM_LAST_ERROR) |
| 21 << "Any additions to QuicRstStreamErrorCode require an addition to " | 21 << "Any additions to QuicRstStreamErrorCode require an addition to " |
| 22 << "AdjustErrorForVersion and this associated test."; | 22 << "AdjustErrorForVersion and this associated test."; |
| 23 | 23 |
| 24 // If we ever add different RST codes, we should have a test akin to the | 24 // If we ever add different RST codes, we should have a test akin to the |
| 25 // following. | 25 // following. |
| 26 // EXPECT_EQ(QUIC_RST_ACKNOWLEDGEMENT, AdjustErrorForVersion( | 26 // EXPECT_EQ(QUIC_RST_ACKNOWLEDGEMENT, AdjustErrorForVersion( |
| 27 // QUIC_RST_ACKNOWLEDGEMENT, | 27 // QUIC_RST_ACKNOWLEDGEMENT, |
| 28 // QUIC_VERSION_28)); | 28 // QUIC_VERSION_28)); |
| 29 } | 29 } |
| 30 | 30 |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 EXPECT_EQ(2u, queue.NumIntervals()); | 520 EXPECT_EQ(2u, queue.NumIntervals()); |
| 521 EXPECT_TRUE(queue.Contains(10)); | 521 EXPECT_TRUE(queue.Contains(10)); |
| 522 EXPECT_TRUE(queue.Contains(11)); | 522 EXPECT_TRUE(queue.Contains(11)); |
| 523 EXPECT_TRUE(queue.Contains(20)); | 523 EXPECT_TRUE(queue.Contains(20)); |
| 524 EXPECT_TRUE(queue.Contains(21)); | 524 EXPECT_TRUE(queue.Contains(21)); |
| 525 } | 525 } |
| 526 | 526 |
| 527 } // namespace | 527 } // namespace |
| 528 } // namespace test | 528 } // namespace test |
| 529 } // namespace net | 529 } // namespace net |
| OLD | NEW |