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

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

Issue 1940: Replaced calls to functions that msvc consider deprecated. Used... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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-debug.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-utils.cc
===================================================================
--- test/cctest/test-utils.cc (revision 280)
+++ test/cctest/test-utils.cc (working copy)
@@ -162,17 +162,17 @@
int length = strlen(s);
for (int i = 1; i < length * 2; i++) {
static const char kMarker = static_cast<char>(42);
- char* buffer = NewArray<char>(i + 1);
+ Vector<char> buffer = Vector<char>::New(i + 1);
buffer[i] = kMarker;
- int n = OS::SNPrintF(buffer, i, "%s", s);
+ int n = OS::SNPrintF(Vector<char>(buffer.start(), i), "%s", s);
CHECK(n <= i);
CHECK(n == length || n == -1);
- CHECK_EQ(0, strncmp(buffer, s, i - 1));
+ CHECK_EQ(0, strncmp(buffer.start(), s, i - 1));
CHECK_EQ(kMarker, buffer[i]);
if (i <= length) {
- CHECK_EQ(i - 1, strlen(buffer));
+ CHECK_EQ(i - 1, strlen(buffer.start()));
} else {
- CHECK_EQ(length, strlen(buffer));
+ CHECK_EQ(length, strlen(buffer.start()));
}
}
}
« no previous file with comments | « test/cctest/test-debug.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698