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

Unified Diff: test/cctest/test-code-stubs-ia32.cc

Issue 18915009: Fix windows build breakage due to 15645 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix missing header Created 7 years, 5 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-code-stubs-ia32.cc
diff --git a/test/cctest/test-code-stubs-ia32.cc b/test/cctest/test-code-stubs-ia32.cc
index 97124a29719acb96e57ffdf5028a58792ff3c5cd..8e599b3741453df6e6b854cc5de45de04215832c 100644
--- a/test/cctest/test-code-stubs-ia32.cc
+++ b/test/cctest/test-code-stubs-ia32.cc
@@ -27,6 +27,8 @@
#include <stdlib.h>
+#include <limits>
+
#include "v8.h"
#include "cctest.h"
@@ -44,7 +46,8 @@
using namespace v8::internal;
-typedef int32_t STDCALL (*ConvertDToIFunc)(double input);
+typedef int32_t STDCALL ConvertDToIFuncType(double input);
+typedef ConvertDToIFuncType* ConvertDToIFunc;
int STDCALL ConvertDToICVersion(double d) {
@@ -79,7 +82,8 @@ int STDCALL ConvertDToICVersion(double d) {
void RunOneTruncationTestWithTest(ConvertDToIFunc func,
double from,
- int64_t to) {
+ double raw) {
+ uint64_t to = static_cast<int64_t>(raw);
int result = (*func)(from);
CHECK_EQ(static_cast<int>(to), result);
}
@@ -87,8 +91,8 @@ void RunOneTruncationTestWithTest(ConvertDToIFunc func,
// #define NaN and Infinity so that it's possible to cut-and-paste these tests
// directly to a .js file and run them.
-#define NaN NAN
-#define Infinity INFINITY
+#define NaN (OS::nan_value())
+#define Infinity (std::numeric_limits<double>::infinity())
#define RunOneTruncationTest(p1, p2) RunOneTruncationTestWithTest(func, p1, p2)
void RunAllTruncationTests(ConvertDToIFunc func) {
« 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