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

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

Issue 618643002: Replace OStream with std::ostream. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix Created 6 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 | « test/cctest/test-ostreams.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-regexp.cc
diff --git a/test/cctest/test-regexp.cc b/test/cctest/test-regexp.cc
index 9d1d52e6750eb66a1cd96e77ec8b7a9eca1d956f..4a572c8160d4cde8b50d76e3082c9fdaa75ce186 100644
--- a/test/cctest/test-regexp.cc
+++ b/test/cctest/test-regexp.cc
@@ -25,8 +25,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#include <stdlib.h>
+#include <cstdlib>
+#include <sstream>
#include "src/v8.h"
@@ -103,9 +103,9 @@ static void CheckParseEq(const char* input, const char* expected) {
&reader, false, &result, &zone));
CHECK(result.tree != NULL);
CHECK(result.error.is_null());
- OStringStream os;
+ std::ostringstream os;
result.tree->Print(os, &zone);
- CHECK_EQ(expected, os.c_str());
+ CHECK_EQ(expected, os.str().c_str());
}
@@ -435,11 +435,11 @@ TEST(Errors) {
// Check that we don't allow more than kMaxCapture captures
const int kMaxCaptures = 1 << 16; // Must match RegExpParser::kMaxCaptures.
const char* kTooManyCaptures = "Too many captures";
- OStringStream os;
+ std::ostringstream os;
for (int i = 0; i <= kMaxCaptures; i++) {
os << "()";
}
- ExpectError(os.c_str(), kTooManyCaptures);
+ ExpectError(os.str().c_str(), kTooManyCaptures);
}
« no previous file with comments | « test/cctest/test-ostreams.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698