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

Unified Diff: test/unittests/wasm/ast-decoder-unittest.cc

Issue 2487673004: [wasm] Fix -Wsign-compare warnings. (Closed)
Patch Set: address comments Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/fuzzer/wasm-code.cc ('k') | test/unittests/wasm/leb-helper-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/wasm/ast-decoder-unittest.cc
diff --git a/test/unittests/wasm/ast-decoder-unittest.cc b/test/unittests/wasm/ast-decoder-unittest.cc
index 7071f968f63e3baa68be272eacd57985694e8b46..eaed86fab7e3ff759dfe650ca6af5c85ea16dac2 100644
--- a/test/unittests/wasm/ast-decoder-unittest.cc
+++ b/test/unittests/wasm/ast-decoder-unittest.cc
@@ -1184,7 +1184,7 @@ TEST_F(AstDecoderTest, LoadMemAlignment) {
{kExprF64LoadMem, 3}, // --
};
- for (int i = 0; i < arraysize(values); i++) {
+ for (size_t i = 0; i < arraysize(values); i++) {
for (byte alignment = 0; alignment <= 4; alignment++) {
byte code[] = {WASM_ZERO, static_cast<byte>(values[i].instruction),
alignment, ZERO_OFFSET, WASM_DROP};
@@ -1697,7 +1697,7 @@ TEST_F(AstDecoderTest, AsmJsBinOpsCheckOrigin) {
TestModuleEnv module_env;
module = &module_env;
module->origin = kAsmJsOrigin;
- for (int i = 0; i < arraysize(AsmJsBinOps); i++) {
+ for (size_t i = 0; i < arraysize(AsmJsBinOps); i++) {
TestBinop(AsmJsBinOps[i].op, AsmJsBinOps[i].sig);
}
}
@@ -1706,7 +1706,7 @@ TEST_F(AstDecoderTest, AsmJsBinOpsCheckOrigin) {
TestModuleEnv module_env;
module = &module_env;
module->origin = kWasmOrigin;
- for (int i = 0; i < arraysize(AsmJsBinOps); i++) {
+ for (size_t i = 0; i < arraysize(AsmJsBinOps); i++) {
byte code[] = {
WASM_BINOP(AsmJsBinOps[i].op, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))};
EXPECT_FAILURE_SC(AsmJsBinOps[i].sig, code);
@@ -1745,7 +1745,7 @@ TEST_F(AstDecoderTest, AsmJsUnOpsCheckOrigin) {
TestModuleEnv module_env;
module = &module_env;
module->origin = kAsmJsOrigin;
- for (int i = 0; i < arraysize(AsmJsUnOps); i++) {
+ for (size_t i = 0; i < arraysize(AsmJsUnOps); i++) {
TestUnop(AsmJsUnOps[i].op, AsmJsUnOps[i].sig);
}
}
@@ -1754,7 +1754,7 @@ TEST_F(AstDecoderTest, AsmJsUnOpsCheckOrigin) {
TestModuleEnv module_env;
module = &module_env;
module->origin = kWasmOrigin;
- for (int i = 0; i < arraysize(AsmJsUnOps); i++) {
+ for (size_t i = 0; i < arraysize(AsmJsUnOps); i++) {
byte code[] = {WASM_UNOP(AsmJsUnOps[i].op, WASM_GET_LOCAL(0))};
EXPECT_FAILURE_SC(AsmJsUnOps[i].sig, code);
}
« no previous file with comments | « test/fuzzer/wasm-code.cc ('k') | test/unittests/wasm/leb-helper-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698