Add vm param for jsnapi

Description: Add vm param for jsnapi

Testing: all tests passed

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/IAB3YH

Signed-off-by: xiongluo <xiongluo@huawei.com>
Change-Id: I855ce0534cf5ecfa3880c6e3fdbf831d536ced0b
This commit is contained in:
xiongluo 2024-07-08 12:34:14 +08:00
parent 5d66cf6a3f
commit fc8adb6ed9

View File

@ -112,13 +112,13 @@ TEST_F(JSNapiTest, ArkplatformJSNApiTest_BooleanRef)
bool input = true;
Local<BooleanRef> res = BooleanRef::New(vm_, input);
EXPECT_TRUE(res->IsBoolean());
EXPECT_TRUE(res->BooleaValue());
EXPECT_TRUE(res->BooleaValue(vm_));
ASSERT_EQ(ToJSTaggedValue(*res), JSValueRefInternals::VALUE_TRUE);
input = false;
res = BooleanRef::New(vm_, input);
EXPECT_TRUE(res->IsBoolean());
EXPECT_FALSE(res->BooleaValue());
EXPECT_FALSE(res->BooleaValue(vm_));
ASSERT_EQ(ToJSTaggedValue(*res), JSValueRefInternals::VALUE_FALSE);
}