| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/packed_ct_ev_whitelist/bit_stream_reader.h" | 5 #include "components/packed_ct_ev_whitelist/bit_stream_reader.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 #include <stdint.h> |
| 9 |
| 7 #include <algorithm> | 10 #include <algorithm> |
| 8 #include <string> | 11 #include <string> |
| 9 | 12 |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 14 |
| 12 namespace packed_ct_ev_whitelist { | 15 namespace packed_ct_ev_whitelist { |
| 13 namespace internal { | 16 namespace internal { |
| 14 | 17 |
| 15 const uint8_t kSomeData[] = {0xd5, 0xe2, 0xaf, 0xe5, 0xbb, 0x10, 0x7c, 0xd1}; | 18 const uint8_t kSomeData[] = {0xd5, 0xe2, 0xaf, 0xe5, 0xbb, 0x10, 0x7c, 0xd1}; |
| 16 | 19 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 reinterpret_cast<const char*>(kSomeData), static_cast<size_t>(0u))); | 91 reinterpret_cast<const char*>(kSomeData), static_cast<size_t>(0u))); |
| 89 uint64_t v(0); | 92 uint64_t v(0); |
| 90 | 93 |
| 91 EXPECT_EQ(0u, reader.BitsLeft()); | 94 EXPECT_EQ(0u, reader.BitsLeft()); |
| 92 EXPECT_FALSE(reader.ReadBits(1, &v)); | 95 EXPECT_FALSE(reader.ReadBits(1, &v)); |
| 93 EXPECT_FALSE(reader.ReadUnaryEncoding(&v)); | 96 EXPECT_FALSE(reader.ReadUnaryEncoding(&v)); |
| 94 } | 97 } |
| 95 | 98 |
| 96 } // namespace internal | 99 } // namespace internal |
| 97 } // namespace packed_ct_ev_whitelist | 100 } // namespace packed_ct_ev_whitelist |
| OLD | NEW |