Index: test/cctest/test-api.cc |
=================================================================== |
--- test/cctest/test-api.cc (revision 11273) |
+++ test/cctest/test-api.cc (working copy) |
@@ -10865,14 +10865,18 @@ |
} |
+static int64_t cast(intptr_t x) { return static_cast<int64_t>(x); } |
+ |
+ |
THREADED_TEST(ExternalAllocatedMemory) { |
v8::HandleScope outer; |
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)); |
} |