Revision: 11275
Author:   erikcorry
Date:     Wed Apr 11 06:41:48 2012
Log:      A version of test-api.cc that compiles both on Mac and on Linux.
Review URL: http://codereview.chromium.org/10050013
http://code.google.com/p/v8/source/detail?r=11275

Modified:
 /branches/bleeding_edge/test/cctest/test-api.cc

=======================================
--- /branches/bleeding_edge/test/cctest/test-api.cc     Wed Apr 11 03:18:42 2012
+++ /branches/bleeding_edge/test/cctest/test-api.cc     Wed Apr 11 06:41:48 2012
@@ -10863,6 +10863,9 @@
   env->Exit();
   env.Dispose();
 }
+
+
+static int64_t cast(intptr_t x) { return static_cast<int64_t>(x); }


 THREADED_TEST(ExternalAllocatedMemory) {
@@ -10870,9 +10873,10 @@
   v8::Persistent<Context> env(Context::New());
   CHECK(!env.IsEmpty());
   const intptr_t kSize = 1024*1024;
-  CHECK_EQ(v8::V8::AdjustAmountOfExternalAllocatedMemory(kSize), kSize);
-  CHECK_EQ(v8::V8::AdjustAmountOfExternalAllocatedMemory(-kSize),
-           static_cast<intptr_t>(0));
+  CHECK_EQ(cast(v8::V8::AdjustAmountOfExternalAllocatedMemory(kSize)),
+           cast(kSize));
+  CHECK_EQ(cast(v8::V8::AdjustAmountOfExternalAllocatedMemory(-kSize)),
+           cast(0));
 }


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to