diff options
Diffstat (limited to 'gin/wrappable_unittest.cc')
-rw-r--r-- | gin/wrappable_unittest.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gin/wrappable_unittest.cc b/gin/wrappable_unittest.cc index 8dbaf30..ef0dce4 100644 --- a/gin/wrappable_unittest.cc +++ b/gin/wrappable_unittest.cc @@ -94,11 +94,11 @@ class MyCallableObject : public Wrappable<MyCallableObject> { ~MyCallableObject() override {} - void Call(int val, const gin::Arguments& arguments) { + void Call(int val1, int val2, int val3, const gin::Arguments& arguments) { if (arguments.IsConstructCall()) arguments.ThrowTypeError("Cannot be called as constructor."); else - result_ = val; + result_ = val1; } int result_; @@ -230,7 +230,7 @@ TEST_F(WrappableTest, CallAsFunction) { EXPECT_EQ(0, object->result()); v8::Handle<v8::String> source = StringToV8(isolate, "(function(obj) {" - "obj(42);" + "obj(42, 2, 5);" "})"); gin::TryCatch try_catch; v8::Handle<v8::Script> script = v8::Script::Compile(source); @@ -253,7 +253,7 @@ TEST_F(WrappableTest, CallAsConstructor) { EXPECT_EQ(0, object->result()); v8::Handle<v8::String> source = StringToV8(isolate, "(function(obj) {" - "new obj(42);" + "new obj(42, 2, 5);" "})"); gin::TryCatch try_catch; v8::Handle<v8::Script> script = v8::Script::Compile(source); |