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

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

Issue 256041: Fast fix to make tree green. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 | « src/checks.h ('k') | 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
===================================================================
--- test/cctest/test-api.cc (revision 3013)
+++ test/cctest/test-api.cc (working copy)
@@ -702,12 +702,18 @@
}
+#if V8_HOST_ARCH_64_BIT
+# define CAST_TO_INT64(x) (int(x))
Lasse Reichstein 2009/10/02 20:01:23 It seems counter-intuitive to have a macro called
+#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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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());
}
« no previous file with comments | « src/checks.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698