diff --git a/test/addons-napi/test_error/test_error.c b/test/addons-napi/test_error/test_error.c index c9ac7a425fae76..52a9ac7956954e 100644 --- a/test/addons-napi/test_error/test_error.c +++ b/test/addons-napi/test_error/test_error.c @@ -1,7 +1,7 @@ #include #include "../common.h" -napi_value checkError(napi_env env, napi_callback_info info) { +static napi_value checkError(napi_env env, napi_callback_info info) { size_t argc = 1; napi_value args[1]; NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); @@ -15,7 +15,7 @@ napi_value checkError(napi_env env, napi_callback_info info) { return result; } -napi_value throwExistingError(napi_env env, napi_callback_info info) { +static napi_value throwExistingError(napi_env env, napi_callback_info info) { napi_value message; napi_value error; NAPI_CALL(env, napi_create_string_utf8( @@ -25,34 +25,34 @@ napi_value throwExistingError(napi_env env, napi_callback_info info) { return NULL; } -napi_value throwError(napi_env env, napi_callback_info info) { +static napi_value throwError(napi_env env, napi_callback_info info) { NAPI_CALL(env, napi_throw_error(env, NULL, "error")); return NULL; } -napi_value throwRangeError(napi_env env, napi_callback_info info) { +static napi_value throwRangeError(napi_env env, napi_callback_info info) { NAPI_CALL(env, napi_throw_range_error(env, NULL, "range error")); return NULL; } -napi_value throwTypeError(napi_env env, napi_callback_info info) { +static napi_value throwTypeError(napi_env env, napi_callback_info info) { NAPI_CALL(env, napi_throw_type_error(env, NULL, "type error")); return NULL; } -napi_value throwErrorCode(napi_env env, napi_callback_info info) { +static napi_value throwErrorCode(napi_env env, napi_callback_info info) { NAPI_CALL(env, napi_throw_error(env, "ERR_TEST_CODE", "Error [error]")); return NULL; } -napi_value throwRangeErrorCode(napi_env env, napi_callback_info info) { +static napi_value throwRangeErrorCode(napi_env env, napi_callback_info info) { NAPI_CALL(env, napi_throw_range_error(env, "ERR_TEST_CODE", "RangeError [range error]")); return NULL; } -napi_value throwTypeErrorCode(napi_env env, napi_callback_info info) { +static napi_value throwTypeErrorCode(napi_env env, napi_callback_info info) { NAPI_CALL(env, napi_throw_type_error(env, "ERR_TEST_CODE", "TypeError [type error]")); @@ -60,7 +60,7 @@ napi_value throwTypeErrorCode(napi_env env, napi_callback_info info) { } -napi_value createError(napi_env env, napi_callback_info info) { +static napi_value createError(napi_env env, napi_callback_info info) { napi_value result; napi_value message; NAPI_CALL(env, napi_create_string_utf8( @@ -69,7 +69,7 @@ napi_value createError(napi_env env, napi_callback_info info) { return result; } -napi_value createRangeError(napi_env env, napi_callback_info info) { +static napi_value createRangeError(napi_env env, napi_callback_info info) { napi_value result; napi_value message; NAPI_CALL(env, napi_create_string_utf8( @@ -78,7 +78,7 @@ napi_value createRangeError(napi_env env, napi_callback_info info) { return result; } -napi_value createTypeError(napi_env env, napi_callback_info info) { +static napi_value createTypeError(napi_env env, napi_callback_info info) { napi_value result; napi_value message; NAPI_CALL(env, napi_create_string_utf8( @@ -87,7 +87,7 @@ napi_value createTypeError(napi_env env, napi_callback_info info) { return result; } -napi_value createErrorCode(napi_env env, napi_callback_info info) { +static napi_value createErrorCode(napi_env env, napi_callback_info info) { napi_value result; napi_value message; napi_value code; @@ -99,7 +99,7 @@ napi_value createErrorCode(napi_env env, napi_callback_info info) { return result; } -napi_value createRangeErrorCode(napi_env env, napi_callback_info info) { +static napi_value createRangeErrorCode(napi_env env, napi_callback_info info) { napi_value result; napi_value message; napi_value code; @@ -113,7 +113,7 @@ napi_value createRangeErrorCode(napi_env env, napi_callback_info info) { return result; } -napi_value createTypeErrorCode(napi_env env, napi_callback_info info) { +static napi_value createTypeErrorCode(napi_env env, napi_callback_info info) { napi_value result; napi_value message; napi_value code; @@ -135,7 +135,7 @@ static napi_value throwArbitrary(napi_env env, napi_callback_info info) { return NULL; } -napi_value Init(napi_env env, napi_value exports) { +static napi_value Init(napi_env env, napi_value exports) { napi_property_descriptor descriptors[] = { DECLARE_NAPI_PROPERTY("checkError", checkError), DECLARE_NAPI_PROPERTY("throwExistingError", throwExistingError),