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 "courgette/encoded_program.h" | 5 #include "courgette/encoded_program.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "courgette/disassembler.h" | |
15 #include "courgette/image_utils.h" | 14 #include "courgette/image_utils.h" |
16 #include "courgette/label_manager.h" | 15 #include "courgette/label_manager.h" |
17 #include "courgette/streams.h" | 16 #include "courgette/streams.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
19 | 18 |
20 namespace courgette { | 19 namespace courgette { |
21 | 20 |
22 namespace { | 21 namespace { |
23 | 22 |
24 // Helper class to instantiate RVAToLabel while managing allocation. | 23 // Helper class to instantiate RVAToLabel while managing allocation. |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 const uint8_t golden_rel32_addresses[] = { | 193 const uint8_t golden_rel32_addresses[] = { |
195 0x04, // 4 address deltas. | 194 0x04, // 4 address deltas. |
196 0x20, 0x11, 0x00, 0x32, | 195 0x20, 0x11, 0x00, 0x32, |
197 }; | 196 }; |
198 EXPECT_TRUE(CompareSink(golden_rel32_addresses, | 197 EXPECT_TRUE(CompareSink(golden_rel32_addresses, |
199 arraysize(golden_rel32_addresses), | 198 arraysize(golden_rel32_addresses), |
200 sinks.stream(kStreamRel32Addresses))); | 199 sinks.stream(kStreamRel32Addresses))); |
201 } | 200 } |
202 | 201 |
203 } // namespace courgette | 202 } // namespace courgette |
OLD | NEW |