Home
last modified time | relevance | path

Searched refs:NAPI_ASSERT (Results 1 – 25 of 30) sorted by relevance

12

/third_party/node/test/js-native-api/test_array/
Dtest_array.c10 NAPI_ASSERT(env, argc >= 2, "Wrong number of arguments"); in TestGetElement()
15 NAPI_ASSERT(env, valuetype0 == napi_object, in TestGetElement()
21 NAPI_ASSERT(env, valuetype1 == napi_number, in TestGetElement()
28 NAPI_ASSERT(env, index >= 0, "Invalid index. Expects a positive integer."); in TestGetElement()
40 NAPI_ASSERT(env, ((uint32_t)index < length), "Index out of bounds!"); in TestGetElement()
53 NAPI_ASSERT(env, argc >= 2, "Wrong number of arguments"); in TestHasElement()
58 NAPI_ASSERT(env, valuetype0 == napi_object, in TestHasElement()
64 NAPI_ASSERT(env, valuetype1 == napi_number, in TestHasElement()
92 NAPI_ASSERT(env, argc == 2, "Wrong number of arguments"); in TestDeleteElement()
96 NAPI_ASSERT(env, valuetype0 == napi_object, in TestDeleteElement()
[all …]
/third_party/node/test/js-native-api/test_object/
Dtest_object.c13 NAPI_ASSERT(env, argc >= 2, "Wrong number of arguments"); in Get()
18 NAPI_ASSERT(env, valuetype0 == napi_object, in Get()
24 NAPI_ASSERT(env, valuetype1 == napi_string || valuetype1 == napi_symbol, in Get()
41 NAPI_ASSERT(env, argc >= 2, "Wrong number of arguments"); in GetNamed()
46 NAPI_ASSERT(env, value_type0 == napi_object, in GetNamed()
52 NAPI_ASSERT(env, value_type1 == napi_string, in GetNamed()
59 NAPI_ASSERT(env, key_length <= 255, in GetNamed()
72 NAPI_ASSERT(env, argc >= 1, "Wrong number of arguments"); in GetPropertyNames()
77 NAPI_ASSERT(env, value_type0 == napi_object, in GetPropertyNames()
91 NAPI_ASSERT(env, argc >= 1, "Wrong number of arguments"); in GetSymbolNames()
[all …]
/third_party/node/test/js-native-api/test_string/
Dtest_string.c11 NAPI_ASSERT(env, argc >= 1, "Wrong number of arguments"); in TestLatin1()
16 NAPI_ASSERT(env, valuetype == napi_string, in TestLatin1()
37 NAPI_ASSERT(env, argc >= 1, "Wrong number of arguments"); in TestUtf8()
42 NAPI_ASSERT(env, valuetype == napi_string, in TestUtf8()
63 NAPI_ASSERT(env, argc >= 1, "Wrong number of arguments"); in TestUtf16()
68 NAPI_ASSERT(env, valuetype == napi_string, in TestUtf16()
90 NAPI_ASSERT(env, argc >= 1, "Wrong number of arguments"); in TestLatin1Insufficient()
95 NAPI_ASSERT(env, valuetype == napi_string, in TestLatin1Insufficient()
116 NAPI_ASSERT(env, argc >= 1, "Wrong number of arguments"); in TestUtf8Insufficient()
121 NAPI_ASSERT(env, valuetype == napi_string, in TestUtf8Insufficient()
[all …]
/third_party/node/test/js-native-api/test_typedarray/
Dtest_typedarray.c11 NAPI_ASSERT(env, argc == 2, "Wrong number of arguments"); in Multiply()
16 NAPI_ASSERT(env, valuetype0 == napi_object, in Multiply()
23 NAPI_ASSERT(env, is_typedarray, in Multiply()
29 NAPI_ASSERT(env, valuetype1 == napi_number, in Multiply()
125 NAPI_ASSERT(env, argc == 2 || argc == 4, "Wrong number of arguments"); in CreateTypedArray()
131 NAPI_ASSERT(env, valuetype0 == napi_object, in CreateTypedArray()
137 NAPI_ASSERT(env, is_typedarray, in CreateTypedArray()
144 NAPI_ASSERT(env, valuetype1 == napi_object, in CreateTypedArray()
150 NAPI_ASSERT(env, is_arraybuffer, in CreateTypedArray()
164 NAPI_ASSERT(env, valuetype2 == napi_number, in CreateTypedArray()
[all …]
/third_party/node/test/js-native-api/test_dataview/
Dtest_dataview.c10 NAPI_ASSERT(env, argc == 3, "Wrong number of arguments"); in CreateDataView()
16 NAPI_ASSERT(env, valuetype0 == napi_object, in CreateDataView()
22 NAPI_ASSERT(env, is_arraybuffer, in CreateDataView()
29 NAPI_ASSERT(env, valuetype1 == napi_number, in CreateDataView()
38 NAPI_ASSERT(env, valuetype2 == napi_number, in CreateDataView()
57 NAPI_ASSERT(env, argc == 1, "Wrong number of arguments"); in CreateDataViewFromJSDataView()
63 NAPI_ASSERT(env, valuetype == napi_object, in CreateDataViewFromJSDataView()
69 NAPI_ASSERT(env, is_dataview, in CreateDataViewFromJSDataView()
/third_party/node/test/js-native-api/test_reference/
Dtest_reference.c44 NAPI_ASSERT(env, argc == 1, "Expect one argument only (symbol description)"); in CreateSymbol()
71 NAPI_ASSERT(env, argc == 1, "Expected one argument."); in CheckExternal()
76 NAPI_ASSERT(env, argtype == napi_external, "Expected an external value."); in CheckExternal()
81 NAPI_ASSERT(env, data != NULL && *(int*)data == test_value, in CheckExternal()
88 NAPI_ASSERT(env, test_reference == NULL, in CreateReference()
94 NAPI_ASSERT(env, argc == 2, "Expected two arguments."); in CreateReference()
102 NAPI_ASSERT(env, test_reference != NULL, in CreateReference()
109 NAPI_ASSERT(env, test_reference != NULL, in DeleteReference()
118 NAPI_ASSERT(env, test_reference != NULL, in IncrementRefcount()
130 NAPI_ASSERT(env, test_reference != NULL, in DecrementRefcount()
[all …]
/third_party/node/test/js-native-api/test_number/
Dtest_number.c9 NAPI_ASSERT(env, argc >= 1, "Wrong number of arguments"); in Test()
14 NAPI_ASSERT(env, valuetype0 == napi_number, in Test()
31 NAPI_ASSERT(env, argc >= 1, "Wrong number of arguments"); in TestUint32Truncation()
36 NAPI_ASSERT(env, valuetype0 == napi_number, in TestUint32Truncation()
53 NAPI_ASSERT(env, argc >= 1, "Wrong number of arguments"); in TestInt32Truncation()
58 NAPI_ASSERT(env, valuetype0 == napi_number, in TestInt32Truncation()
75 NAPI_ASSERT(env, argc >= 1, "Wrong number of arguments"); in TestInt64Truncation()
80 NAPI_ASSERT(env, valuetype0 == napi_number, in TestInt64Truncation()
/third_party/node/test/js-native-api/test_new_target/
Dtest_new_target.c15 NAPI_ASSERT(env, !result, "this !== new.target"); in BaseClass()
18 NAPI_ASSERT(env, newTargetArg != NULL, "newTargetArg != NULL"); in BaseClass()
20 NAPI_ASSERT(env, !result, "new.target !== undefined"); in BaseClass()
37 NAPI_ASSERT(env, newTargetArg != NULL, "newTargetArg != NULL"); in Constructor()
39 NAPI_ASSERT(env, !result, "new.target !== undefined"); in Constructor()
43 NAPI_ASSERT(env, result, "new.target === Constructor"); in Constructor()
52 NAPI_ASSERT(env, newTargetArg == NULL, "newTargetArg == NULL"); in OrdinaryFunction()
/third_party/node/test/js-native-api/test_bigint/
Dtest_bigint.c36 NAPI_ASSERT(env, argc >= 1, "Wrong number of arguments"); in TestInt64()
41 NAPI_ASSERT(env, valuetype0 == napi_bigint, in TestInt64()
59 NAPI_ASSERT(env, argc >= 1, "Wrong number of arguments"); in TestUint64()
64 NAPI_ASSERT(env, valuetype0 == napi_bigint, in TestUint64()
83 NAPI_ASSERT(env, argc >= 1, "Wrong number of arguments"); in TestWords()
88 NAPI_ASSERT(env, valuetype0 == napi_bigint, in TestWords()
102 NAPI_ASSERT(env, word_count == expected_word_count, in TestWords()
/third_party/node/test/node-api/test_buffer/
Dtest_buffer.c34 NAPI_ASSERT(env, theCopy, "Failed to copy static text for newBuffer"); in newBuffer()
43 NAPI_ASSERT(env, theCopy, "Failed to copy static text for newExternalBuffer"); in newExternalBuffer()
73 NAPI_ASSERT(env, argc == 1, "Wrong number of arguments"); in bufferHasInstance()
78 NAPI_ASSERT(env, in bufferHasInstance()
82 NAPI_ASSERT(env, hasInstance, "bufferHasInstance: instance is not a buffer"); in bufferHasInstance()
92 NAPI_ASSERT(env, argc == 1, "Wrong number of arguments"); in bufferInfo()
/third_party/node/test/js-native-api/test_properties/
Dtest_properties.c10 NAPI_ASSERT(env, argc == 0, "Wrong number of arguments"); in GetValue()
23 NAPI_ASSERT(env, argc == 1, "Wrong number of arguments"); in SetValue()
35 NAPI_ASSERT(env, argc == 1, "Wrong number of arguments"); in Echo()
45 NAPI_ASSERT(env, argc == 2, "Wrong number of arguments"); in HasNamedProperty()
/third_party/node/test/node-api/test_callback_scope/
Dbinding.c11 NAPI_ASSERT(env, argc == 3 , "Wrong number of arguments"); in RunInCallbackScope()
17 NAPI_ASSERT(env, valuetype == napi_object, in RunInCallbackScope()
21 NAPI_ASSERT(env, valuetype == napi_string, in RunInCallbackScope()
25 NAPI_ASSERT(env, valuetype == napi_function, in RunInCallbackScope()
/third_party/node/test/js-native-api/3_callbacks/
D3_callbacks.c10 NAPI_ASSERT(env, argc == 1, in RunCallback()
15 NAPI_ASSERT(env, valuetype0 == napi_function, in RunCallback()
20 NAPI_ASSERT(env, valuetype1 == napi_undefined, in RunCallback()
/third_party/node/test/node-api/test_async/
Dtest_async.c77 NAPI_ASSERT(env, argc >= 3, "Not enough arguments, expected 2."); in Test()
81 NAPI_ASSERT(env, t == napi_number, in Test()
84 NAPI_ASSERT(env, t == napi_object, in Test()
87 NAPI_ASSERT(env, t == napi_function, in Test()
201 NAPI_ASSERT(env, repeated_work_info.ref == NULL, in DoRepeatedWork()
203 NAPI_ASSERT(env, repeated_work_info.work == NULL, in DoRepeatedWork()
/third_party/node/test/node-api/test_threadsafe_function/
Dbinding.c152 NAPI_ASSERT(env, value_type == napi_function, in StopThread()
154 NAPI_ASSERT(env, (ts_fn != NULL), "Existing threadsafe function"); in StopThread()
208 NAPI_ASSERT(env, (ts_fn == NULL), "Existing thread-safe function"); in StartThreadInternal()
229 NAPI_ASSERT(env, in StartThreadInternal()
237 NAPI_ASSERT(env, ts_fn != NULL, "No existing thread-safe function"); in Unref()
243 NAPI_ASSERT(env, ts_fn != NULL, "No existing thread-safe function"); in Release()
/third_party/node/test/js-native-api/test_function/
Dtest_function.c60 NAPI_ASSERT(env, argc > 0, "Wrong number of arguments"); in TestCallFunction()
65 NAPI_ASSERT(env, valuetype0 == napi_function, in TestCallFunction()
123 NAPI_ASSERT(env, argc == 1, "Wrong number of arguments"); in MakeTrackedFunction()
125 NAPI_ASSERT(env, arg_type == napi_function, "Argument must be a function"); in MakeTrackedFunction()
/third_party/node/test/node-api/test_uv_loop/
Dtest_uv_loop.cc16 NAPI_ASSERT(env, in SetImmediate()
50 NAPI_ASSERT(env, argc >= 1, "Not enough arguments, expected 1."); in SetImmediateBinding()
54 NAPI_ASSERT(env, t == napi_function, in SetImmediateBinding()
/third_party/node/test/js-native-api/test_constructor/
Dtest_constructor.c103 NAPI_ASSERT(env, argc == 0, "Wrong number of arguments"); in GetValue()
116 NAPI_ASSERT(env, argc == 1, "Wrong number of arguments"); in SetValue()
128 NAPI_ASSERT(env, argc == 1, "Wrong number of arguments"); in Echo()
144 NAPI_ASSERT(env, argc == 0, "Wrong number of arguments"); in GetStaticValue()
/third_party/node/test/node-api/test_worker_terminate/
Dtest_worker_terminate.c13 NAPI_ASSERT(env, argc >= 1, "Not enough arguments, expected 1."); in Test()
17 NAPI_ASSERT(env, t == napi_function, in Test()
/third_party/node/test/js-native-api/2_function_arguments/
D2_function_arguments.c9 NAPI_ASSERT(env, argc >= 2, "Wrong number of arguments"); in Add()
17 NAPI_ASSERT(env, valuetype0 == napi_number && valuetype1 == napi_number, in Add()
/third_party/node/test/node-api/test_async_context/
Dbinding.c15 NAPI_ASSERT(env, argc > 0, "Wrong number of arguments"); in MakeCallback()
37 NAPI_ASSERT(env, false, "Unexpected argument type"); in MakeCallback()
95 NAPI_ASSERT(env, argc == 1, "Wrong number of arguments"); in DestroyAsyncResource()
/third_party/node/test/node-api/test_make_callback/
Dbinding.c15 NAPI_ASSERT(env, argc > 0, "Wrong number of arguments"); in MakeCallback()
42 NAPI_ASSERT(env, false, "Unexpected argument type"); in MakeCallback()
/third_party/node/test/js-native-api/test_date/
Dtest_date.c9 NAPI_ASSERT(env, argc >= 1, "Wrong number of arguments"); in createDate()
14 NAPI_ASSERT(env, valuetype0 == napi_number, in createDate()
/third_party/node/test/node-api/test_instance_data/
Dtest_instance_data.c168 NAPI_ASSERT(env, data->js_cb_ref == NULL, "reference must be NULL"); in TestThreadsafeFunction()
169 NAPI_ASSERT(env, in TestThreadsafeFunction()
192 NAPI_ASSERT(env, in TestThreadsafeFunction()
/third_party/node/test/js-native-api/test_handle_scope/
Dtest_handle_scope.c42 NAPI_ASSERT(env, status == napi_escape_called_twice, "Escaping twice fails"); in NewScopeEscapeTwice()
63 NAPI_ASSERT(env, status == napi_pending_exception, in NewScopeWithException()

12