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

Unified Diff: test/unittests/source-position-table-unittest.cc

Issue 2493553002: Fix -Wsign-compare warnings in parser, scanner, regexp, runtime. (Closed)
Patch Set: 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/cctest/test-code-stub-assembler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/source-position-table-unittest.cc
diff --git a/test/unittests/source-position-table-unittest.cc b/test/unittests/source-position-table-unittest.cc
index 01d96750614fe1f86b91dff86f8aa44f0a30b815..b1d63aa3dde7f014224ffabf9866f723a6444168 100644
--- a/test/unittests/source-position-table-unittest.cc
+++ b/test/unittests/source-position-table-unittest.cc
@@ -25,7 +25,7 @@ static int offsets[] = {0, 1, 2, 3, 4, 30, 31, 32,
TEST_F(SourcePositionTableTest, EncodeStatement) {
SourcePositionTableBuilder builder(zone());
- for (int i = 0; i < arraysize(offsets); i++) {
+ for (size_t i = 0; i < arraysize(offsets); i++) {
builder.AddPosition(offsets[i], offsets[i], true);
}
@@ -37,7 +37,7 @@ TEST_F(SourcePositionTableTest, EncodeStatement) {
TEST_F(SourcePositionTableTest, EncodeStatementDuplicates) {
SourcePositionTableBuilder builder(zone());
- for (int i = 0; i < arraysize(offsets); i++) {
+ for (size_t i = 0; i < arraysize(offsets); i++) {
builder.AddPosition(offsets[i], offsets[i], true);
builder.AddPosition(offsets[i], offsets[i] + 1, true);
}
@@ -50,7 +50,7 @@ TEST_F(SourcePositionTableTest, EncodeStatementDuplicates) {
TEST_F(SourcePositionTableTest, EncodeExpression) {
SourcePositionTableBuilder builder(zone());
- for (int i = 0; i < arraysize(offsets); i++) {
+ for (size_t i = 0; i < arraysize(offsets); i++) {
builder.AddPosition(offsets[i], offsets[i], false);
}
CHECK(!builder.ToSourcePositionTable(isolate(), Handle<AbstractCode>())
@@ -62,7 +62,7 @@ TEST_F(SourcePositionTableTest, EncodeAscending) {
int code_offset = 0;
int source_position = 0;
- for (int i = 0; i < arraysize(offsets); i++) {
+ for (size_t i = 0; i < arraysize(offsets); i++) {
code_offset += offsets[i];
source_position += offsets[i];
if (i % 2) {
@@ -73,7 +73,7 @@ TEST_F(SourcePositionTableTest, EncodeAscending) {
}
// Also test negative offsets for source positions:
- for (int i = 0; i < arraysize(offsets); i++) {
+ for (size_t i = 0; i < arraysize(offsets); i++) {
code_offset += offsets[i];
source_position -= offsets[i];
if (i % 2) {
« no previous file with comments | « test/cctest/test-code-stub-assembler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698