Merge pull request !861 from HarmmerDing/master
This commit is contained in:
openharmony_ci 2024-06-07 06:13:03 +00:00 committed by Gitee
commit 4ca37d53e1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 1426 additions and 2 deletions

File diff suppressed because it is too large Load Diff

View File

@ -41,6 +41,7 @@ public:
virtual napi_status napi_get_named_property(napi_env, napi_value, const char*, napi_value*) = 0;
virtual int uv_queue_work(uv_loop_t*, uv_work_t*, uv_work_cb, uv_after_work_cb) = 0;
virtual napi_status napi_get_value_int32(napi_env, napi_value, int32_t*) = 0;
virtual napi_status napi_get_value_int64(napi_env, napi_value, int64_t*) = 0;
virtual napi_status napi_create_string_utf8(napi_env, const char*, size_t, napi_value*) = 0;
virtual napi_status napi_create_int32(napi_env, int32_t, napi_value*) = 0;
virtual napi_status napi_create_int64(napi_env, int64_t, napi_value*) = 0;
@ -71,6 +72,7 @@ public:
MOCK_METHOD4(napi_get_named_property, napi_status(napi_env, napi_value, const char*, napi_value*));
MOCK_METHOD4(uv_queue_work, int(uv_loop_t*, uv_work_t*, uv_work_cb, uv_after_work_cb));
MOCK_METHOD3(napi_get_value_int32, napi_status(napi_env, napi_value, int32_t*));
MOCK_METHOD3(napi_get_value_int64, napi_status(napi_env, napi_value, int64_t*));
MOCK_METHOD3(napi_create_int64, napi_status(napi_env, int64_t, napi_value*));
MOCK_METHOD4(napi_create_string_utf8, napi_status(napi_env, const char*, size_t, napi_value*));
MOCK_METHOD3(napi_create_int32, napi_status(napi_env, int32_t, napi_value*));

View File

@ -53,6 +53,11 @@ napi_status napi_get_value_int32(napi_env env, napi_value value, int32_t* result
return OHOS::FileAccessFwk::Assistant::ins_->napi_get_value_int32(env, value, result);
}
napi_status napi_get_value_int64(napi_env env, napi_value value, int64_t* result)
{
return OHOS::FileAccessFwk::Assistant::ins_->napi_get_value_int64(env, value, result);
}
napi_status napi_create_string_utf8(napi_env env, const char* str, size_t length, napi_value* result)
{
return OHOS::FileAccessFwk::Assistant::ins_->napi_create_string_utf8(env, str, length, result);