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

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

Issue 11727004: Remove InputBuffer (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 12 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/unicode-inl.h ('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 d243745337207fd38c2c12fe2569db2973d9fe2c..b7ce9acd70ad0de9e9f673f34ade2ac0e8d5b626 100644
--- a/test/cctest/test-strings.cc
+++ b/test/cctest/test-strings.cc
@@ -1,7 +1,7 @@
// Copyright 2012 the V8 project authors. All rights reserved.
// Check that we can traverse very deep stacks of ConsStrings using
-// StringInputBuffer. Check that Get(int) works on very deep stacks
+// StringCharacterStram. Check that Get(int) works on very deep stacks
// of ConsStrings. These operations may not be very fast, but they
// should be possible without getting errors due to too deep recursion.
@@ -514,23 +514,16 @@ static Handle<String> ConstructBalanced(
}
-static StringInputBuffer buffer;
static ConsStringIteratorOp cons_string_iterator_op_1;
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, &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());
- CHECK(character_stream_1.HasMore());
+ while (character_stream_1.HasMore()) {
CHECK(character_stream_2.HasMore());
- uint16_t c = buffer.GetNext();
- CHECK_EQ(c, buffer2.GetNext());
- CHECK_EQ(c, character_stream_1.GetNext());
+ uint16_t c = character_stream_1.GetNext();
CHECK_EQ(c, character_stream_2.GetNext());
i++;
}
@@ -543,17 +536,11 @@ static void Traverse(Handle<String> s1, Handle<String> s2) {
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, &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());
+ while (character_stream_1.HasMore() && i < chars) {
CHECK(character_stream_2.HasMore());
- uint16_t c = buffer.GetNext();
- CHECK_EQ(c, buffer2.GetNext());
- CHECK_EQ(c, character_stream_1.GetNext());
+ uint16_t c = character_stream_1.GetNext();
CHECK_EQ(c, character_stream_2.GetNext());
i++;
}
« no previous file with comments | « src/unicode-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698