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/handles.h" | 7 #include "src/handles.h" |
8 #include "src/objects-inl.h" | 8 #include "src/objects-inl.h" |
9 #include "src/wasm/module-decoder.h" | 9 #include "src/wasm/module-decoder.h" |
10 #include "src/wasm/wasm-macro-gen.h" | 10 #include "src/wasm/wasm-macro-gen.h" |
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 SECTION(FUNCTION_TABLE, 3), 1, 1, 0, | 597 SECTION(FUNCTION_TABLE, 3), 1, 1, 0, |
598 }; | 598 }; |
599 | 599 |
600 EXPECT_FAILURE(data); | 600 EXPECT_FAILURE(data); |
601 } | 601 } |
602 | 602 |
603 class WasmSignatureDecodeTest : public TestWithZone {}; | 603 class WasmSignatureDecodeTest : public TestWithZone {}; |
604 | 604 |
605 TEST_F(WasmSignatureDecodeTest, Ok_v_v) { | 605 TEST_F(WasmSignatureDecodeTest, Ok_v_v) { |
606 static const byte data[] = {SIG_ENTRY_v_v}; | 606 static const byte data[] = {SIG_ENTRY_v_v}; |
607 base::AccountingAllocator allocator; | 607 v8::internal::AccountingAllocator allocator; |
608 Zone zone(&allocator); | 608 Zone zone(&allocator); |
609 FunctionSig* sig = | 609 FunctionSig* sig = |
610 DecodeWasmSignatureForTesting(&zone, data, data + arraysize(data)); | 610 DecodeWasmSignatureForTesting(&zone, data, data + arraysize(data)); |
611 | 611 |
612 EXPECT_TRUE(sig != nullptr); | 612 EXPECT_TRUE(sig != nullptr); |
613 EXPECT_EQ(0, sig->parameter_count()); | 613 EXPECT_EQ(0, sig->parameter_count()); |
614 EXPECT_EQ(0, sig->return_count()); | 614 EXPECT_EQ(0, sig->return_count()); |
615 } | 615 } |
616 | 616 |
617 TEST_F(WasmSignatureDecodeTest, Ok_t_v) { | 617 TEST_F(WasmSignatureDecodeTest, Ok_t_v) { |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1245 NO_LOCAL_NAMES, // -- | 1245 NO_LOCAL_NAMES, // -- |
1246 FOO_STRING, | 1246 FOO_STRING, |
1247 NO_LOCAL_NAMES, // -- | 1247 NO_LOCAL_NAMES, // -- |
1248 }; | 1248 }; |
1249 EXPECT_VERIFIES(data); | 1249 EXPECT_VERIFIES(data); |
1250 } | 1250 } |
1251 | 1251 |
1252 } // namespace wasm | 1252 } // namespace wasm |
1253 } // namespace internal | 1253 } // namespace internal |
1254 } // namespace v8 | 1254 } // namespace v8 |
OLD | NEW |