Index: test/cctest/compiler/test-operator.cc |
diff --git a/test/cctest/compiler/test-operator.cc b/test/cctest/compiler/test-operator.cc |
index af75d6766306a3bd0d64fc6ac475d6c67682bfc2..3df76e8b7cca2df13e7d1b1300e8413ec7277dd9 100644 |
--- a/test/cctest/compiler/test-operator.cc |
+++ b/test/cctest/compiler/test-operator.cc |
@@ -2,6 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include <sstream> |
+ |
#include "src/v8.h" |
#include "src/compiler/operator.h" |
@@ -11,7 +13,6 @@ using namespace v8::internal; |
using namespace v8::internal::compiler; |
#define NaN (v8::base::OS::nan_value()) |
-#define Infinity (std::numeric_limits<double>::infinity()) |
TEST(TestOperatorMnemonic) { |
SimpleOperator op1(10, Operator::kNoProperties, 0, 0, "ThisOne"); |
@@ -67,9 +68,9 @@ TEST(TestSimpleOperatorEquals) { |
static SmartArrayPointer<const char> OperatorToString(Operator* op) { |
- OStringStream os; |
+ std::ostringstream os; |
os << *op; |
- return SmartArrayPointer<const char>(StrDup(os.c_str())); |
+ return SmartArrayPointer<const char>(StrDup(os.str().c_str())); |
} |
@@ -236,9 +237,6 @@ TEST(TestOperator1doublePrint) { |
Operator1<double> op3(12, Operator::kNoProperties, 0, 1, "FooBar", 2e+123); |
CHECK_EQ("FooBar[2e+123]", OperatorToString(&op3).get()); |
- Operator1<double> op4(12, Operator::kNoProperties, 0, 1, "BarFoo", Infinity); |
- CHECK_EQ("BarFoo[inf]", OperatorToString(&op4).get()); |
- |
Operator1<double> op5(12, Operator::kNoProperties, 0, 1, "BarFoo", NaN); |
CHECK_EQ("BarFoo[nan]", OperatorToString(&op5).get()); |
} |