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

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

Issue 8983014: Fix windows build. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Changing to signed int. Created 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index c48a521969e56991cd4126cbc3454803da3ebaad..8faf44c67c68f4b9d5e78e891c24ed91e4f09f3a 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -15732,29 +15732,30 @@ uint8_t callback_fired = 0;
void CallCompletedCallback1() {
- printf("Firing callback 1.\n");
+ i::OS::Print("Firing callback 1.\n");
callback_fired ^= 1; // Toggle first bit.
}
void CallCompletedCallback2() {
- printf("Firing callback 2.\n");
+ i::OS::Print("Firing callback 2.\n");
callback_fired ^= 2; // Toggle second bit.
}
Handle<Value> RecursiveCall(const Arguments& args) {
- uint32_t level = args[0]->Uint32Value();
+ int level = args[0]->Int32Value();
if (level < 3) {
level++;
- printf("Entering recursion level %d.\n", level);
+ i::OS::Print("Entering recursion level %d.\n", level);
char script[64];
- snprintf(script, sizeof(script), "recursion(%d)", level);
- CompileRun(script);
- printf("Leaving recursion level %d.\n", level);
+ i::Vector<char> script_vector(script, sizeof(script));
+ i::OS::SNPrintF(script_vector, "recursion(%d)", level);
+ CompileRun(script_vector.start());
+ i::OS::Print("Leaving recursion level %d.\n", level);
CHECK_EQ(0, callback_fired);
} else {
- printf("Recursion ends.\n");
+ i::OS::Print("Recursion ends.\n");
CHECK_EQ(0, callback_fired);
}
return Undefined();
@@ -15772,19 +15773,19 @@ TEST(CallCompletedCallback) {
v8::V8::AddCallCompletedCallback(CallCompletedCallback1);
v8::V8::AddCallCompletedCallback(CallCompletedCallback1);
v8::V8::AddCallCompletedCallback(CallCompletedCallback2);
- printf("--- Script (1) ---\n");
+ i::OS::Print("--- Script (1) ---\n");
Local<Script> script =
v8::Script::Compile(v8::String::New("recursion(0)"));
script->Run();
CHECK_EQ(3, callback_fired);
- printf("\n--- Script (2) ---\n");
+ i::OS::Print("\n--- Script (2) ---\n");
callback_fired = 0;
v8::V8::RemoveCallCompletedCallback(CallCompletedCallback1);
script->Run();
CHECK_EQ(2, callback_fired);
- printf("\n--- Function ---\n");
+ i::OS::Print("\n--- Function ---\n");
callback_fired = 0;
Local<Function> recursive_function =
Local<Function>::Cast(env->Global()->Get(v8_str("recursion")));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698