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

Side by Side Diff: test/unittests/wasm/wasm-macro-gen-unittest.cc

Issue 2758563002: [gn] Enable stricter build flags (Closed)
Patch Set: Address comment Created 3 years, 9 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/inspector/inspector-test.cc ('k') | no next file » | 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/wasm-macro-gen.h" 7 #include "src/wasm/wasm-macro-gen.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
11 namespace wasm { 11 namespace wasm {
12 12
13 class WasmMacroGenTest : public TestWithZone {}; 13 class WasmMacroGenTest : public TestWithZone {};
14 14
15 #define EXPECT_SIZE(size, ...) \ 15 #define EXPECT_SIZE(size, ...) \
16 do { \ 16 do { \
17 byte code[] = {__VA_ARGS__}; \ 17 byte code[] = {__VA_ARGS__}; \
18 USE(code); \
18 EXPECT_EQ(static_cast<size_t>(size), sizeof(code)); \ 19 EXPECT_EQ(static_cast<size_t>(size), sizeof(code)); \
19 } while (false) 20 } while (false)
20 21
21 TEST_F(WasmMacroGenTest, Constants) { 22 TEST_F(WasmMacroGenTest, Constants) {
22 EXPECT_SIZE(2, WASM_ONE); 23 EXPECT_SIZE(2, WASM_ONE);
23 EXPECT_SIZE(2, WASM_ZERO); 24 EXPECT_SIZE(2, WASM_ZERO);
24 25
25 EXPECT_SIZE(2, WASM_I32V_1(-22)); 26 EXPECT_SIZE(2, WASM_I32V_1(-22));
26 EXPECT_SIZE(2, WASM_I32V_1(54)); 27 EXPECT_SIZE(2, WASM_I32V_1(54));
27 28
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 EXPECT_SIZE(5, WASM_LOAD_MEM_OFFSET(kMemTypes[i], 11, WASM_ZERO)); 305 EXPECT_SIZE(5, WASM_LOAD_MEM_OFFSET(kMemTypes[i], 11, WASM_ZERO));
305 } 306 }
306 for (size_t i = 0; i < arraysize(kMemTypes); i++) { 307 for (size_t i = 0; i < arraysize(kMemTypes); i++) {
307 EXPECT_SIZE(7, WASM_STORE_MEM_OFFSET(kMemTypes[i], 13, WASM_ZERO, 308 EXPECT_SIZE(7, WASM_STORE_MEM_OFFSET(kMemTypes[i], 13, WASM_ZERO,
308 WASM_GET_LOCAL(0))); 309 WASM_GET_LOCAL(0)));
309 } 310 }
310 } 311 }
311 } // namespace wasm 312 } // namespace wasm
312 } // namespace internal 313 } // namespace internal
313 } // namespace v8 314 } // namespace v8
OLDNEW
« no previous file with comments | « test/inspector/inspector-test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698