• Home
  • Raw
  • Download

Lines Matching full:constructor

158     Local<FunctionRef> constructor = FunctionRef::NewSendableClassFunction(  in GetNewSendableClassFunction()  local
161 return constructor; in GetNewSendableClassFunction()
167 Local<FunctionRef> constructor = GetNewSendableClassFunction(vm_, FunctionRef::Null(vm_)); in HWTEST_F_L0() local
169 ASSERT_EQ("name", constructor->GetName(vm_)->ToString(vm_)); in HWTEST_F_L0()
170 ASSERT_TRUE(constructor->IsFunction(vm_)); in HWTEST_F_L0()
171 JSHandle<JSTaggedValue> jsConstructor = JSNApiHelper::ToJSHandle(constructor); in HWTEST_F_L0()
174 Local<JSValueRef> functionPrototype = constructor->GetFunctionPrototype(vm_); in HWTEST_F_L0()
181 … thread_, JSNApiHelper::ToJSHandle(constructor), globalConst->GetHandledPrototypeString()) in HWTEST_F_L0()
190 Local<FunctionRef> constructor = GetNewSendableClassFunction(vm_, FunctionRef::Null(vm_)); in HWTEST_F_L0() local
191 Local<ObjectRef> prototype = constructor->GetFunctionPrototype(vm_); in HWTEST_F_L0()
193 ASSERT_EQ("static", constructor->Get(vm_, staticKey)->ToString(vm_)->ToString(vm_)); in HWTEST_F_L0()
195 ASSERT_EQ("undefined", constructor->Get(vm_, invalidKey)->ToString(vm_)->ToString(vm_)); in HWTEST_F_L0()
198 // set static property on constructor in HWTEST_F_L0()
199 constructor->Set(vm_, staticKey, StringRef::NewFromUtf8(vm_, "static0")); in HWTEST_F_L0()
200 ASSERT_EQ("static0", constructor->Get(vm_, staticKey)->ToString(vm_)->ToString(vm_)); in HWTEST_F_L0()
206 // set invalid property on constructor in HWTEST_F_L0()
208 constructor->Set(vm_, invalidKey, StringRef::NewFromUtf8(vm_, "invalid")); in HWTEST_F_L0()
211 ASSERT_EQ("undefined", constructor->Get(vm_, invalidKey)->ToString(vm_)->ToString(vm_)); in HWTEST_F_L0()
224 Local<FunctionRef> constructor = GetNewSendableClassFunction(vm_, FunctionRef::Null(vm_), true); in HWTEST_F_L0() local
225 Local<ObjectRef> prototype = constructor->GetFunctionPrototype(vm_); in HWTEST_F_L0()
227 ASSERT_EQ("static", constructor->Get(vm_, staticKey)->ToString(vm_)->ToString(vm_)); in HWTEST_F_L0()
229 ASSERT_EQ("undefined", constructor->Get(vm_, invalidKey)->ToString(vm_)->ToString(vm_)); in HWTEST_F_L0()
232 // set static property on constructor in HWTEST_F_L0()
233 constructor->Set(vm_, staticKey, StringRef::NewFromUtf8(vm_, "static0")); in HWTEST_F_L0()
234 ASSERT_EQ("static0", constructor->Get(vm_, staticKey)->ToString(vm_)->ToString(vm_)); in HWTEST_F_L0()
240 // set invalid property on constructor in HWTEST_F_L0()
242 constructor->Set(vm_, invalidKey, StringRef::NewFromUtf8(vm_, "invalid")); in HWTEST_F_L0()
245 ASSERT_EQ("undefined", constructor->Get(vm_, invalidKey)->ToString(vm_)->ToString(vm_)); in HWTEST_F_L0()
258 Local<FunctionRef> constructor = GetNewSendableClassFunction(vm_, FunctionRef::Null(vm_)); in HWTEST_F_L0() local
260 Local<ObjectRef> obj = constructor->Constructor(vm_, argv, 0); in HWTEST_F_L0()
261 Local<ObjectRef> obj0 = constructor->Constructor(vm_, argv, 0); in HWTEST_F_L0()
263 …nction::InstanceOf(thread_, JSNApiHelper::ToJSHandle(obj), JSNApiHelper::ToJSHandle(constructor))); in HWTEST_F_L0()
264 …ction::InstanceOf(thread_, JSNApiHelper::ToJSHandle(obj0), JSNApiHelper::ToJSHandle(constructor))); in HWTEST_F_L0()
301 Local<FunctionRef> constructor = GetNewSendableClassFunction(vm_, FunctionRef::Null(vm_), true); in HWTEST_F_L0() local
303 Local<ObjectRef> obj = constructor->Constructor(vm_, argv, 0); in HWTEST_F_L0()
304 Local<ObjectRef> obj0 = constructor->Constructor(vm_, argv, 0); in HWTEST_F_L0()
306 …nction::InstanceOf(thread_, JSNApiHelper::ToJSHandle(obj), JSNApiHelper::ToJSHandle(constructor))); in HWTEST_F_L0()
307 …ction::InstanceOf(thread_, JSNApiHelper::ToJSHandle(obj0), JSNApiHelper::ToJSHandle(constructor))); in HWTEST_F_L0()
345 Local<FunctionRef> constructor = GetNewSendableClassFunction(vm_, parent); in HWTEST_F_L0() local
347 Local<ObjectRef> obj = constructor->Constructor(vm_, argv, 0); in HWTEST_F_L0()
348 Local<ObjectRef> obj0 = constructor->Constructor(vm_, argv, 0); in HWTEST_F_L0()
359 // get parent static property from constructor in HWTEST_F_L0()
361 ASSERT_EQ("parentStatic", constructor->Get(vm_, parentStaticKey)->ToString(vm_)->ToString(vm_)); in HWTEST_F_L0()
372 Local<FunctionRef> constructor = GetNewSendableClassFunction(vm_, parent); in HWTEST_F_L0() local
374 Local<ObjectRef> obj = constructor->Constructor(vm_, argv, 0); in HWTEST_F_L0()
375 Local<ObjectRef> obj0 = constructor->Constructor(vm_, argv, 0); in HWTEST_F_L0()
386 // get parent static property from constructor in HWTEST_F_L0()
388 ASSERT_EQ("parentStatic", constructor->Get(vm_, parentStaticKey)->ToString(vm_)->ToString(vm_)); in HWTEST_F_L0()
399 Local<FunctionRef> constructor = GetNewSendableClassFunction(vm_, parent, false, true); in HWTEST_F_L0() local
401 Local<ObjectRef> obj = constructor->Constructor(vm_, argv, 0); in HWTEST_F_L0()
445 Local<FunctionRef> constructor = FunctionRef::NewSendableClassFunction( in HWTEST_F_L0() local
448 Local<FunctionRef> staticValue = constructor->Get(vm_, staticKey); in HWTEST_F_L0()
488 Local<FunctionRef> constructor = FunctionRef::NewSendableClassFunction( in HWTEST_F_L0() local
491 ASSERT_EQ("getterSetter", constructor->Get(vm_, getterSetter)->ToString(vm_)->ToString(vm_)); in HWTEST_F_L0()
492 ASSERT_EQ("getterSetter", constructor->Get(vm_, staticKey)->ToString(vm_)->ToString(vm_)); in HWTEST_F_L0()
493 constructor->Set(vm_, staticKey, StringRef::NewFromUtf8(vm_, "getterSetter0")); in HWTEST_F_L0()
494 ASSERT_EQ("getterSetter0", constructor->Get(vm_, getterSetter)->ToString(vm_)->ToString(vm_)); in HWTEST_F_L0()
495 ASSERT_EQ("getterSetter0", constructor->Get(vm_, staticKey)->ToString(vm_)->ToString(vm_)); in HWTEST_F_L0()