OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project 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 "test/unittests/test-utils.h" | 5 #include "test/unittests/test-utils.h" |
6 | 6 |
| 7 #include "src/objects-inl.h" |
7 #include "src/wasm/decoder.h" | 8 #include "src/wasm/decoder.h" |
8 #include "src/wasm/wasm-macro-gen.h" | 9 #include "src/wasm/wasm-macro-gen.h" |
9 | 10 |
10 namespace v8 { | 11 namespace v8 { |
11 namespace internal { | 12 namespace internal { |
12 namespace wasm { | 13 namespace wasm { |
13 | 14 |
14 class DecoderTest : public TestWithZone { | 15 class DecoderTest : public TestWithZone { |
15 public: | 16 public: |
16 DecoderTest() : decoder(nullptr, nullptr) {} | 17 DecoderTest() : decoder(nullptr, nullptr) {} |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 byte data[] = {0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x77}; | 659 byte data[] = {0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x77}; |
659 decoder.Reset(data, data + sizeof(data)); | 660 decoder.Reset(data, data + sizeof(data)); |
660 decoder.checked_read_i64v(decoder.start(), 0, &length); | 661 decoder.checked_read_i64v(decoder.start(), 0, &length); |
661 EXPECT_EQ(10, length); | 662 EXPECT_EQ(10, length); |
662 EXPECT_FALSE(decoder.ok()); | 663 EXPECT_FALSE(decoder.ok()); |
663 } | 664 } |
664 | 665 |
665 } // namespace wasm | 666 } // namespace wasm |
666 } // namespace internal | 667 } // namespace internal |
667 } // namespace v8 | 668 } // namespace v8 |
OLD | NEW |