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

Unified Diff: test/unittests/wasm/leb-helper-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/unittests/wasm/ast-decoder-unittest.cc ('k') | test/unittests/wasm/module-decoder-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/wasm/leb-helper-unittest.cc
diff --git a/test/unittests/wasm/leb-helper-unittest.cc b/test/unittests/wasm/leb-helper-unittest.cc
index b9759332bbfde4524fd577ea5901416434e9ce07..ff7bedc4cfcfc2f0dc374c9dc29c0167ae30ec1f 100644
--- a/test/unittests/wasm/leb-helper-unittest.cc
+++ b/test/unittests/wasm/leb-helper-unittest.cc
@@ -23,19 +23,19 @@ TEST_F(LEBHelperTest, sizeof_u32v) {
EXPECT_EQ(1, LEBHelper::sizeof_u32v(i));
}
- for (uint32_t i = (1 << 7); i < (1 << 9); i++) {
+ for (uint32_t i = (1u << 7); i < (1u << 9); i++) {
EXPECT_EQ(2, LEBHelper::sizeof_u32v(i));
}
- for (uint32_t i = (1 << 14); i < (1 << 16); i += 33) {
+ for (uint32_t i = (1u << 14); i < (1u << 16); i += 33) {
EXPECT_EQ(3, LEBHelper::sizeof_u32v(i));
}
- for (uint32_t i = (1 << 21); i < (1 << 24); i += 33999) {
+ for (uint32_t i = (1u << 21); i < (1u << 24); i += 33999) {
EXPECT_EQ(4, LEBHelper::sizeof_u32v(i));
}
- for (uint32_t i = (1 << 28); i < (1 << 31); i += 33997779) {
+ for (uint32_t i = (1u << 28); i < (1u << 31); i += 33997779u) {
EXPECT_EQ(5, LEBHelper::sizeof_u32v(i));
}
« no previous file with comments | « test/unittests/wasm/ast-decoder-unittest.cc ('k') | test/unittests/wasm/module-decoder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698