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

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

Issue 1847543002: Expose a lower bound of malloc'd memory via heap statistics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 8 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/wasm/encoder-unittest.cc ('k') | tools/gyp/v8.gyp » ('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/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
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
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
OLDNEW
« no previous file with comments | « test/unittests/wasm/encoder-unittest.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698