Index: test/cctest/test-strings.cc |
diff --git a/test/cctest/test-strings.cc b/test/cctest/test-strings.cc |
index 5a9ccbb5790732cb0b42528860867bcbafa811be..68e735b886e45c9a8dbfa53c3330f1af0c0ac6f9 100644 |
--- a/test/cctest/test-strings.cc |
+++ b/test/cctest/test-strings.cc |
@@ -198,18 +198,22 @@ static Handle<String> ConstructBalanced( |
static StringInputBuffer buffer; |
- |
+static ConsStringIteratorOp consStringIteratorOp; |
static void Traverse(Handle<String> s1, Handle<String> s2) { |
int i = 0; |
buffer.Reset(*s1); |
+ StringCharacterStream characterStream(*s1, 0, &consStringIteratorOp); |
StringInputBuffer buffer2(*s2); |
while (buffer.has_more()) { |
CHECK(buffer2.has_more()); |
+ CHECK(characterStream.HasMore()); |
uint16_t c = buffer.GetNext(); |
CHECK_EQ(c, buffer2.GetNext()); |
+ CHECK_EQ(c, characterStream.GetNext()); |
i++; |
} |
+ CHECK(!characterStream.HasMore()); |
CHECK_EQ(s1->length(), i); |
CHECK_EQ(s2->length(), i); |
} |
@@ -219,10 +223,13 @@ static void TraverseFirst(Handle<String> s1, Handle<String> s2, int chars) { |
int i = 0; |
buffer.Reset(*s1); |
StringInputBuffer buffer2(*s2); |
+ StringCharacterStream characterStream(*s1, 0, &consStringIteratorOp); |
while (buffer.has_more() && i < chars) { |
CHECK(buffer2.has_more()); |
+ CHECK(characterStream.HasMore()); |
uint16_t c = buffer.GetNext(); |
CHECK_EQ(c, buffer2.GetNext()); |
+ CHECK_EQ(c, characterStream.GetNext()); |
i++; |
} |
s1->Get(s1->length() - 1); |