Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: test/unittests/wasm/module-decoder-unittest.cc

Issue 2394213003: Named all zones in the project (Closed)
Patch Set: Merge branch 'master' into zonenames Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/unittests/test-utils.h ('k') | tools/parser-shell.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 }; 605 };
606 606
607 EXPECT_FAILURE(data); 607 EXPECT_FAILURE(data);
608 } 608 }
609 609
610 class WasmSignatureDecodeTest : public TestWithZone {}; 610 class WasmSignatureDecodeTest : public TestWithZone {};
611 611
612 TEST_F(WasmSignatureDecodeTest, Ok_v_v) { 612 TEST_F(WasmSignatureDecodeTest, Ok_v_v) {
613 static const byte data[] = {SIG_ENTRY_v_v}; 613 static const byte data[] = {SIG_ENTRY_v_v};
614 v8::internal::AccountingAllocator allocator; 614 v8::internal::AccountingAllocator allocator;
615 Zone zone(&allocator); 615 Zone zone(&allocator, ZONE_NAME);
616 FunctionSig* sig = 616 FunctionSig* sig =
617 DecodeWasmSignatureForTesting(&zone, data, data + sizeof(data)); 617 DecodeWasmSignatureForTesting(&zone, data, data + sizeof(data));
618 618
619 EXPECT_TRUE(sig != nullptr); 619 EXPECT_TRUE(sig != nullptr);
620 EXPECT_EQ(0, sig->parameter_count()); 620 EXPECT_EQ(0, sig->parameter_count());
621 EXPECT_EQ(0, sig->return_count()); 621 EXPECT_EQ(0, sig->return_count());
622 } 622 }
623 623
624 TEST_F(WasmSignatureDecodeTest, Ok_t_v) { 624 TEST_F(WasmSignatureDecodeTest, Ok_t_v) {
625 for (size_t i = 0; i < arraysize(kLocalTypes); i++) { 625 for (size_t i = 0; i < arraysize(kLocalTypes); i++) {
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 SECTION(Unknown, 4), 1, 'X', 17, 18, // -- 1292 SECTION(Unknown, 4), 1, 'X', 17, 18, // --
1293 SECTION(Unknown, 9), 3, 'f', 'o', 'o', 5, 6, 7, 8, 9, // -- 1293 SECTION(Unknown, 9), 3, 'f', 'o', 'o', 5, 6, 7, 8, 9, // --
1294 SECTION(Unknown, 8), 5, 'o', 't', 'h', 'e', 'r', 7, 8, // -- 1294 SECTION(Unknown, 8), 5, 'o', 't', 'h', 'e', 'r', 7, 8, // --
1295 }; 1295 };
1296 EXPECT_VERIFIES(data); 1296 EXPECT_VERIFIES(data);
1297 } 1297 }
1298 1298
1299 } // namespace wasm 1299 } // namespace wasm
1300 } // namespace internal 1300 } // namespace internal
1301 } // namespace v8 1301 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/test-utils.h ('k') | tools/parser-shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698