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

Unified Diff: test/cctest/test-api.cc

Issue 10917065: Fix more windows build warnings. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 4e1948630e0568655a1ff0fc9090416400373a0a..9b0279126df051d69f7397086b7c89d423f1c3c2 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -717,10 +717,10 @@ TEST(ExternalStringWithDisposeHandling) {
static void TestNewLatin1String(int encoding1, int encoding2) {
const char* chars1 = "ASCII 123";
const char* chars1js = "'ASCII 123'";
- int str1_len = strlen(chars1);
+ int str1_len = static_cast<int>(strlen(chars1));
const char* chars2 = "Non-ASCII \xAB\xCD\xEF";
const char* chars2js = "'Non-ASCII \\u00ab\\u00cd\\u00ef'";
- int str2_len = strlen(chars2);
+ int str2_len = static_cast<int>(strlen(chars2));
Local<String> str1 = String::New(chars1, str1_len, encoding1);
Local<String> str2 = String::New(chars2, str2_len, encoding2);
@@ -826,17 +826,21 @@ TEST(WriteLatin1String) {
CHECK(v8::Utils::OpenHandle(*sub_string)->IsSlicedString());
char buffer[64];
- CHECK_EQ(strlen(latin1_ascii), latin1_ascii_string->WriteLatin1(buffer));
+ CHECK_EQ(static_cast<int>(strlen(latin1_ascii)),
+ latin1_ascii_string->WriteLatin1(buffer));
CHECK_EQ(0, strcmp(latin1_ascii, buffer));
- CHECK_EQ(strlen(latin1), latin1_string->WriteLatin1(buffer));
+ CHECK_EQ(static_cast<int>(strlen(latin1)),
+ latin1_string->WriteLatin1(buffer));
CHECK_EQ(0, strcmp(latin1, buffer));
- CHECK_EQ(strlen(concat), concat_string->WriteLatin1(buffer));
+ CHECK_EQ(static_cast<int>(strlen(concat)),
+ concat_string->WriteLatin1(buffer));
CHECK_EQ(0, strcmp(concat, buffer));
- CHECK_EQ(strlen(sub), sub_string->WriteLatin1(buffer));
+ CHECK_EQ(static_cast<int>(strlen(sub)),
+ sub_string->WriteLatin1(buffer));
CHECK_EQ(0, strcmp(sub, buffer));
memset(buffer, 0x1, sizeof(buffer));
- CHECK_EQ(strlen(latin1),
+ CHECK_EQ(static_cast<int>(strlen(latin1)),
latin1_string->WriteLatin1(buffer,
0,
String::kUndefinedLength,
@@ -846,7 +850,7 @@ TEST(WriteLatin1String) {
buffer[strlen(latin1)] = '\0';
CHECK_EQ(0, strcmp(latin1, buffer));
- CHECK_EQ(strlen(latin1) - 2,
+ CHECK_EQ(static_cast<int>(strlen(latin1)) - 2,
latin1_string->WriteLatin1(buffer, 2));
CHECK_EQ(0, strncmp(latin1 + 2, buffer, strlen(latin1)));
}
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698