Commit 359ad562 authored by antonm@chromium.org's avatar antonm@chromium.org

Fast fix to make tree green.

Review URL: http://codereview.chromium.org/256041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3015 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent bec08c35
......@@ -80,6 +80,7 @@ static inline void CheckEqualsHelper(const char* file, int line,
}
}
#if !V8_HOST_ARCH_64_BIT
// Helper function used by the CHECK_EQ function when given int64_t
// arguments. Should not be called directly.
static inline void CheckEqualsHelper(const char* file, int line,
......@@ -98,6 +99,7 @@ static inline void CheckEqualsHelper(const char* file, int line,
uint32_t(value >> 32), uint32_t(value));
}
}
#endif
// Helper function used by the CHECK_NE function when given int
......
......@@ -702,12 +702,18 @@ THREADED_TEST(PropertyHandler) {
}
#if V8_HOST_ARCH_64_BIT
# define CAST_TO_INT64(x) (int(x))
#else
# define CAST_TO_INT64(x) (int64_t(x))
#endif
THREADED_TEST(TinyInteger) {
v8::HandleScope scope;
LocalContext env;
int32_t value = 239;
Local<v8::Integer> value_obj = v8::Integer::New(value);
CHECK_EQ(int64_t(value), value_obj->Value());
CHECK_EQ(CAST_TO_INT64(value), value_obj->Value());
}
......@@ -718,7 +724,7 @@ THREADED_TEST(BigSmiInteger) {
CHECK(i::Smi::IsValid(value));
CHECK(!i::Smi::IsValid(value + 1));
Local<v8::Integer> value_obj = v8::Integer::New(value);
CHECK_EQ(int64_t(value), value_obj->Value());
CHECK_EQ(CAST_TO_INT64(value), value_obj->Value());
}
......@@ -728,7 +734,7 @@ THREADED_TEST(BigInteger) {
int32_t value = (1 << 30) + 1;
CHECK(!i::Smi::IsValid(value));
Local<v8::Integer> value_obj = v8::Integer::New(value);
CHECK_EQ(int64_t(value), value_obj->Value());
CHECK_EQ(CAST_TO_INT64(value), value_obj->Value());
}
......@@ -737,7 +743,7 @@ THREADED_TEST(TinyUnsignedInteger) {
LocalContext env;
uint32_t value = 239;
Local<v8::Integer> value_obj = v8::Integer::New(value);
CHECK_EQ(int64_t(value), value_obj->Value());
CHECK_EQ(CAST_TO_INT64(value), value_obj->Value());
}
......@@ -748,7 +754,7 @@ THREADED_TEST(BigUnsignedSmiInteger) {
CHECK(i::Smi::IsValid(value));
CHECK(!i::Smi::IsValid(value + 1));
Local<v8::Integer> value_obj = v8::Integer::New(value);
CHECK_EQ(int64_t(value), value_obj->Value());
CHECK_EQ(CAST_TO_INT64(value), value_obj->Value());
}
......@@ -758,7 +764,7 @@ THREADED_TEST(BigUnsignedInteger) {
uint32_t value = (1 << 30) + 1;
CHECK(!i::Smi::IsValid(value));
Local<v8::Integer> value_obj = v8::Integer::New(value);
CHECK_EQ(int64_t(value), value_obj->Value());
CHECK_EQ(CAST_TO_INT64(value), value_obj->Value());
}
......@@ -767,7 +773,7 @@ THREADED_TEST(OutOfSignedRangeUnsignedInteger) {
LocalContext env;
uint32_t value = uint32_t(0xffffffff);
Local<v8::Integer> value_obj = v8::Integer::New(value);
CHECK_EQ(int64_t(value), value_obj->Value());
CHECK_EQ(CAST_TO_INT64(value), value_obj->Value());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment