!113 Fix PtTypesTest failed

Merge pull request !113 from Gymee/fix_ut
This commit is contained in:
openharmony_ci 2022-12-09 04:29:46 +00:00 committed by Gitee
commit 2b94f37888
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -403,10 +403,10 @@ HWTEST_F_L0(PtTypesTest, SymbolRemoteObjectTest)
HWTEST_F_L0(PtTypesTest, DescriptionForObjectForDate)
{
double input = 123456789;
double input = 123456789.0;
Local<DateRef> date = DateRef::New(ecmaVm, input);
std::string description = ObjectRemoteObject::DescriptionForObject(ecmaVm, date);
ASSERT_TRUE(description == "Fri Jan 02 1970 18:17:36 GMT+0800");
ASSERT_TRUE(description.find("GMT") != std::string::npos);
}
HWTEST_F_L0(PtTypesTest, DescriptionForObjectForPromise)
@ -833,4 +833,4 @@ HWTEST_F_L0(PtTypesTest, PropertyDescriptorCreate)
std::unique_ptr<tooling::PropertyDescriptor> result = tooling::PropertyDescriptor::Create(*ptJson);
ASSERT_TRUE(!result);
}
} // namespace panda::test
} // namespace panda::test