diff --git a/arkui/ace_napi_test/entry/src/main/cpp/napi/napi_test.cpp b/arkui/ace_napi_test/entry/src/main/cpp/napi/napi_test.cpp index 485c756dc5010aff8e5be6446e14e43d723d5c2c..f7f0d0c2bfa83d4fd0af38e7fbc7329c4b672d09 100644 --- a/arkui/ace_napi_test/entry/src/main/cpp/napi/napi_test.cpp +++ b/arkui/ace_napi_test/entry/src/main/cpp/napi/napi_test.cpp @@ -285,10 +285,10 @@ static napi_value getAndClearLastException(napi_env env, napi_callback_info info static napi_value isExceptionPending(napi_env env, napi_callback_info info) { - bool exceptionWasPending = false; + bool exceptionWasPending = true; napi_is_exception_pending(env, &exceptionWasPending); - NAPI_ASSERT(env, exceptionWasPending, "error succes"); + NAPI_ASSERT(env, !exceptionWasPending, "isExceptionPending failed"); napi_value _value; NAPI_CALL(env, napi_create_int32(env, 0, &_value));