OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/wasm/module-decoder.h" | 7 #include "src/wasm/module-decoder.h" |
8 #include "src/wasm/wasm-macro-gen.h" | 8 #include "src/wasm/wasm-macro-gen.h" |
9 #include "src/wasm/wasm-opcodes.h" | 9 #include "src/wasm/wasm-opcodes.h" |
10 | 10 |
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 | 772 |
773 EXPECT_FAILURE(data); | 773 EXPECT_FAILURE(data); |
774 } | 774 } |
775 | 775 |
776 | 776 |
777 class WasmSignatureDecodeTest : public TestWithZone {}; | 777 class WasmSignatureDecodeTest : public TestWithZone {}; |
778 | 778 |
779 | 779 |
780 TEST_F(WasmSignatureDecodeTest, Ok_v_v) { | 780 TEST_F(WasmSignatureDecodeTest, Ok_v_v) { |
781 static const byte data[] = {0, 0}; | 781 static const byte data[] = {0, 0}; |
782 Zone zone; | 782 base::AccountingAllocator allocator; |
| 783 Zone zone(&allocator); |
783 FunctionSig* sig = | 784 FunctionSig* sig = |
784 DecodeWasmSignatureForTesting(&zone, data, data + arraysize(data)); | 785 DecodeWasmSignatureForTesting(&zone, data, data + arraysize(data)); |
785 | 786 |
786 EXPECT_TRUE(sig != nullptr); | 787 EXPECT_TRUE(sig != nullptr); |
787 EXPECT_EQ(0, sig->parameter_count()); | 788 EXPECT_EQ(0, sig->parameter_count()); |
788 EXPECT_EQ(0, sig->return_count()); | 789 EXPECT_EQ(0, sig->return_count()); |
789 } | 790 } |
790 | 791 |
791 | 792 |
792 TEST_F(WasmSignatureDecodeTest, Ok_t_v) { | 793 TEST_F(WasmSignatureDecodeTest, Ok_t_v) { |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1369 NO_LOCAL_NAMES, // -- | 1370 NO_LOCAL_NAMES, // -- |
1370 FOO_STRING, | 1371 FOO_STRING, |
1371 NO_LOCAL_NAMES, // -- | 1372 NO_LOCAL_NAMES, // -- |
1372 }; | 1373 }; |
1373 EXPECT_VERIFIES(data); | 1374 EXPECT_VERIFIES(data); |
1374 } | 1375 } |
1375 | 1376 |
1376 } // namespace wasm | 1377 } // namespace wasm |
1377 } // namespace internal | 1378 } // namespace internal |
1378 } // namespace v8 | 1379 } // namespace v8 |
OLD | NEW |