Index: gin/converter_unittest.cc |
diff --git a/gin/converter_unittest.cc b/gin/converter_unittest.cc |
index 791d7e66ec5bb05278b8425621c53cd6515253b1..6358a317e67179c336d6f87dd5ead63f54918200 100644 |
--- a/gin/converter_unittest.cc |
+++ b/gin/converter_unittest.cc |
@@ -15,8 +15,6 @@ |
#include "v8/include/v8.h" |
using v8::Array; |
-using v8::Boolean; |
-using v8::Handle; |
using v8::HandleScope; |
using v8::Integer; |
using v8::Null; |
@@ -24,7 +22,6 @@ using v8::Number; |
using v8::Object; |
using v8::String; |
using v8::Undefined; |
-using v8::Value; |
rmcilroy
2014/10/06 15:41:03
I'm not sure why these changes are required? Can
baixo
2014/10/07 14:53:28
Done.
|
namespace gin { |
@@ -34,25 +31,25 @@ TEST_F(ConverterTest, Bool) { |
HandleScope handle_scope(instance_->isolate()); |
EXPECT_TRUE(Converter<bool>::ToV8(instance_->isolate(), true)->StrictEquals( |
- Boolean::New(instance_->isolate(), true))); |
+ v8::Boolean::New(instance_->isolate(), true))); |
EXPECT_TRUE(Converter<bool>::ToV8(instance_->isolate(), false)->StrictEquals( |
- Boolean::New(instance_->isolate(), false))); |
+ v8::Boolean::New(instance_->isolate(), false))); |
struct { |
- Handle<Value> input; |
+ v8::Handle<v8::Value> input; |
bool expected; |
} test_data[] = { |
- { Boolean::New(instance_->isolate(), false).As<Value>(), false }, |
- { Boolean::New(instance_->isolate(), true).As<Value>(), true }, |
- { Number::New(instance_->isolate(), 0).As<Value>(), false }, |
- { Number::New(instance_->isolate(), 1).As<Value>(), true }, |
- { Number::New(instance_->isolate(), -1).As<Value>(), true }, |
- { Number::New(instance_->isolate(), 0.1).As<Value>(), true }, |
- { String::NewFromUtf8(instance_->isolate(), "").As<Value>(), false }, |
- { String::NewFromUtf8(instance_->isolate(), "foo").As<Value>(), true }, |
- { Object::New(instance_->isolate()).As<Value>(), true }, |
- { Null(instance_->isolate()).As<Value>(), false }, |
- { Undefined(instance_->isolate()).As<Value>(), false }, |
+ { v8::Boolean::New(instance_->isolate(), false).As<v8::Value>(), false }, |
+ { v8::Boolean::New(instance_->isolate(), true).As<v8::Value>(), true }, |
+ { Number::New(instance_->isolate(), 0).As<v8::Value>(), false }, |
+ { Number::New(instance_->isolate(), 1).As<v8::Value>(), true }, |
+ { Number::New(instance_->isolate(), -1).As<v8::Value>(), true }, |
+ { Number::New(instance_->isolate(), 0.1).As<v8::Value>(), true }, |
+ { String::NewFromUtf8(instance_->isolate(), "").As<v8::Value>(), false }, |
+ { String::NewFromUtf8(instance_->isolate(), "foo").As<v8::Value>(), true }, |
+ { Object::New(instance_->isolate()).As<v8::Value>(), true }, |
+ { Null(instance_->isolate()).As<v8::Value>(), false }, |
+ { Undefined(instance_->isolate()).As<v8::Value>(), false }, |
}; |
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_data); ++i) { |
@@ -83,19 +80,21 @@ TEST_F(ConverterTest, Int32) { |
bool expect_sucess; |
int expected_result; |
} test_data_from[] = { |
- { Boolean::New(instance_->isolate(), false).As<Value>(), false, 0 }, |
- { Boolean::New(instance_->isolate(), true).As<Value>(), false, 0 }, |
- { Integer::New(instance_->isolate(), -1).As<Value>(), true, -1 }, |
- { Integer::New(instance_->isolate(), 0).As<Value>(), true, 0 }, |
- { Integer::New(instance_->isolate(), 1).As<Value>(), true, 1 }, |
- { Number::New(instance_->isolate(), -1).As<Value>(), true, -1 }, |
- { Number::New(instance_->isolate(), 1.1).As<Value>(), false, 0 }, |
- { String::NewFromUtf8(instance_->isolate(), "42").As<Value>(), false, 0 }, |
- { String::NewFromUtf8(instance_->isolate(), "foo").As<Value>(), false, 0 }, |
- { Object::New(instance_->isolate()).As<Value>(), false, 0 }, |
- { Array::New(instance_->isolate()).As<Value>(), false, 0 }, |
- { v8::Null(instance_->isolate()).As<Value>(), false, 0 }, |
- { v8::Undefined(instance_->isolate()).As<Value>(), false, 0 }, |
+ { v8::Boolean::New(instance_->isolate(), false).As<v8::Value>(), false, 0 }, |
+ { v8::Boolean::New(instance_->isolate(), true).As<v8::Value>(), false, 0 }, |
+ { Integer::New(instance_->isolate(), -1).As<v8::Value>(), true, -1 }, |
+ { Integer::New(instance_->isolate(), 0).As<v8::Value>(), true, 0 }, |
+ { Integer::New(instance_->isolate(), 1).As<v8::Value>(), true, 1 }, |
+ { Number::New(instance_->isolate(), -1).As<v8::Value>(), true, -1 }, |
+ { Number::New(instance_->isolate(), 1.1).As<v8::Value>(), false, 0 }, |
+ { String::NewFromUtf8(instance_->isolate(), "42").As<v8::Value>(), |
+ false, 0 }, |
+ { String::NewFromUtf8(instance_->isolate(), "foo").As<v8::Value>(), |
+ false, 0 }, |
+ { Object::New(instance_->isolate()).As<v8::Value>(), false, 0 }, |
+ { Array::New(instance_->isolate()).As<v8::Value>(), false, 0 }, |
+ { v8::Null(instance_->isolate()).As<v8::Value>(), false, 0 }, |
+ { v8::Undefined(instance_->isolate()).As<v8::Value>(), false, 0 }, |
}; |
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_data_from); ++i) { |
@@ -116,7 +115,7 @@ TEST_F(ConverterTest, Vector) { |
expected.push_back(0); |
expected.push_back(1); |
- Handle<Array> js_array = Handle<Array>::Cast( |
+ v8::Handle<Array> js_array = v8::Handle<Array>::Cast( |
Converter<std::vector<int> >::ToV8(instance_->isolate(), expected)); |
ASSERT_FALSE(js_array.IsEmpty()); |
EXPECT_EQ(3u, js_array->Length()); |