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

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

Issue 11727003: Reland r13275 and 13276 (Remove most uses of StringInputBuffer). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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/v8conversions.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-strings.cc
diff --git a/test/cctest/test-strings.cc b/test/cctest/test-strings.cc
index 652a60af53bfec386b79f350a605e094b67bcf7c..d243745337207fd38c2c12fe2569db2973d9fe2c 100644
--- a/test/cctest/test-strings.cc
+++ b/test/cctest/test-strings.cc
@@ -369,7 +369,7 @@ void AccumulateStatsWithOperator(
void VerifyConsString(Handle<String> root, ConsStringGenerationData* data) {
// Verify basic data.
CHECK(root->IsConsString());
- CHECK((unsigned)root->length() == data->stats_.chars_);
+ CHECK(static_cast<unsigned>(root->length()) == data->stats_.chars_);
// Recursive verify.
ConsStringStats stats;
AccumulateStats(ConsString::cast(*root), &stats);
@@ -521,8 +521,8 @@ static ConsStringIteratorOp cons_string_iterator_op_2;
static void Traverse(Handle<String> s1, Handle<String> s2) {
int i = 0;
buffer.Reset(*s1);
- StringCharacterStream character_stream_1(*s1, 0, &cons_string_iterator_op_1);
- StringCharacterStream character_stream_2(*s2, 0, &cons_string_iterator_op_2);
+ StringCharacterStream character_stream_1(*s1, &cons_string_iterator_op_1);
+ StringCharacterStream character_stream_2(*s2, &cons_string_iterator_op_2);
StringInputBuffer buffer2(*s2);
while (buffer.has_more()) {
CHECK(buffer2.has_more());
@@ -545,8 +545,8 @@ static void TraverseFirst(Handle<String> s1, Handle<String> s2, int chars) {
int i = 0;
buffer.Reset(*s1);
StringInputBuffer buffer2(*s2);
- StringCharacterStream character_stream_1(*s1, 0, &cons_string_iterator_op_1);
- StringCharacterStream character_stream_2(*s2, 0, &cons_string_iterator_op_2);
+ StringCharacterStream character_stream_1(*s1, &cons_string_iterator_op_1);
+ StringCharacterStream character_stream_2(*s2, &cons_string_iterator_op_2);
while (buffer.has_more() && i < chars) {
CHECK(buffer2.has_more());
CHECK(character_stream_1.HasMore());
@@ -621,9 +621,9 @@ static void VerifyCharacterStream(
// Want to test the offset == length case.
if (offset > length) offset = length;
StringCharacterStream flat_stream(
- flat_string, (unsigned) offset, &cons_string_iterator_op_1);
+ flat_string, &cons_string_iterator_op_1, static_cast<unsigned>(offset));
StringCharacterStream cons_stream(
- cons_string, (unsigned) offset, &cons_string_iterator_op_2);
+ cons_string, &cons_string_iterator_op_2, static_cast<unsigned>(offset));
for (int i = offset; i < length; i++) {
uint16_t c = flat_string->Get(i);
CHECK(flat_stream.HasMore());
« no previous file with comments | « src/v8conversions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698