| 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_data_writer.h" | 5 #include "net/quic/core/quic_data_writer.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "net/quic/quic_data_reader.h" | 11 #include "net/quic/core/quic_data_reader.h" |
| 12 #include "net/test/gtest_util.h" | 12 #include "net/test/gtest_util.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(QuicDataWriterTest, SanityCheckUFloat16Consts) { | 19 TEST(QuicDataWriterTest, SanityCheckUFloat16Consts) { |
| 20 // Check the arithmetic on the constants - otherwise the values below make | 20 // Check the arithmetic on the constants - otherwise the values below make |
| 21 // no sense. | 21 // no sense. |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 EXPECT_EQ(i, *reinterpret_cast<uint16_t*>(writer.data() + 2)); | 195 EXPECT_EQ(i, *reinterpret_cast<uint16_t*>(writer.data() + 2)); |
| 196 // Check next decoding. | 196 // Check next decoding. |
| 197 EXPECT_EQ(i < 4096 ? i + 1 : i, | 197 EXPECT_EQ(i < 4096 ? i + 1 : i, |
| 198 *reinterpret_cast<uint16_t*>(writer.data() + 4)); | 198 *reinterpret_cast<uint16_t*>(writer.data() + 4)); |
| 199 } | 199 } |
| 200 } | 200 } |
| 201 | 201 |
| 202 } // namespace | 202 } // namespace |
| 203 } // namespace test | 203 } // namespace test |
| 204 } // namespace net | 204 } // namespace net |
| OLD | NEW |