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

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

Issue 893533003: Revert "Make GCC happy again." and "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.". (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 | « test/cctest/test-serialize.cc ('k') | test/cctest/test-symbols.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-strings.cc
diff --git a/test/cctest/test-strings.cc b/test/cctest/test-strings.cc
index ef4c0452cea4086745a978adc69ec4be745b0833..c77fc36a05d181a3b219bcd27663effc1b6f3092 100644
--- a/test/cctest/test-strings.cc
+++ b/test/cctest/test-strings.cc
@@ -1038,9 +1038,8 @@ TEST(JSONStringifySliceMadeExternal) {
CHECK(v8::Utils::OpenHandle(*slice)->IsSlicedString());
CHECK(v8::Utils::OpenHandle(*underlying)->IsExternalTwoByteString());
- CHECK_EQ(0,
- strcmp("\"bcdefghijklmnopqrstuvwxyz\"",
- *v8::String::Utf8Value(CompileRun("JSON.stringify(slice)"))));
+ CHECK_EQ("\"bcdefghijklmnopqrstuvwxyz\"",
+ *v8::String::Utf8Value(CompileRun("JSON.stringify(slice)")));
}
@@ -1172,7 +1171,7 @@ TEST(TrivialSlice) {
CHECK(result->IsString());
string = v8::Utils::OpenHandle(v8::String::Cast(*result));
CHECK(string->IsSlicedString());
- CHECK_EQ(0, strcmp("bcdefghijklmnopqrstuvwxy", string->ToCString().get()));
+ CHECK_EQ("bcdefghijklmnopqrstuvwxy", string->ToCString().get());
}
@@ -1194,14 +1193,14 @@ TEST(SliceFromSlice) {
string = v8::Utils::OpenHandle(v8::String::Cast(*result));
CHECK(string->IsSlicedString());
CHECK(SlicedString::cast(*string)->parent()->IsSeqString());
- CHECK_EQ(0, strcmp("bcdefghijklmnopqrstuvwxy", string->ToCString().get()));
+ CHECK_EQ("bcdefghijklmnopqrstuvwxy", string->ToCString().get());
result = CompileRun(slice_from_slice);
CHECK(result->IsString());
string = v8::Utils::OpenHandle(v8::String::Cast(*result));
CHECK(string->IsSlicedString());
CHECK(SlicedString::cast(*string)->parent()->IsSeqString());
- CHECK_EQ(0, strcmp("cdefghijklmnopqrstuvwx", string->ToCString().get()));
+ CHECK_EQ("cdefghijklmnopqrstuvwx", string->ToCString().get());
}
@@ -1264,7 +1263,7 @@ TEST(RobustSubStringStub) {
// Ordinary HeapNumbers can be handled (in runtime).
result = CompileRun("%_SubString(short, Math.sqrt(4), 5.1);");
string = v8::Utils::OpenHandle(v8::String::Cast(*result));
- CHECK_EQ(0, strcmp("cde", string->ToCString().get()));
+ CHECK_EQ("cde", string->ToCString().get());
CompileRun("var long = 'abcdefghijklmnopqrstuvwxyz';");
// Invalid indices.
@@ -1279,7 +1278,7 @@ TEST(RobustSubStringStub) {
// Ordinary HeapNumbers within bounds can be handled (in runtime).
result = CompileRun("%_SubString(long, Math.sqrt(4), 17.1);");
string = v8::Utils::OpenHandle(v8::String::Cast(*result));
- CHECK_EQ(0, strcmp("cdefghijklmnopq", string->ToCString().get()));
+ CHECK_EQ("cdefghijklmnopq", string->ToCString().get());
// Test that out-of-bounds substring of a slice fails when the indices
// would have been valid for the underlying string.
« no previous file with comments | « test/cctest/test-serialize.cc ('k') | test/cctest/test-symbols.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698