1 /*
2 * Copyright (c) 2024 SwanLink (Jiangsu) Technology Development Co., LTD.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15 #include "napi_strictqeuals_test.h"
16 const size_t NUM_SIZE_2 = 2;
17 //OH_JSVM_StrictEquals
18 //lhs is int,rhs is int,same value,result is nullptr
TestStrictEqualsTest1(JSVM_Env env,JSVM_CallbackInfo info)19 [[maybe_unused]] JSVM_Value TestStrictEqualsTest1(JSVM_Env env, JSVM_CallbackInfo info)
20 {
21 size_t argc = 1;
22 JSVM_Value argv[1] = {nullptr};
23 OH_JSVM_GetCbInfo(env, info, &argc, argv, nullptr, nullptr);
24
25 int32_t intLhs = 333;
26 JSVM_Value rstLhsValue = nullptr;
27 int32_t intRhs = 333;
28 JSVM_Value rstRhsValue = nullptr;
29 JSVM_Status status = OH_JSVM_CreateInt32(env, intLhs, &rstLhsValue);
30 if (status != JSVM_OK) {
31 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest1: OH_JSVM_CreateInt32 Failed");
32 return nullptr;
33 }
34 status = OH_JSVM_CreateInt32(env, intRhs, &rstRhsValue);
35 if (status != JSVM_OK) {
36 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest1: OH_JSVM_CreateInt32 Failed");
37 return nullptr;
38 }
39 status = OH_JSVM_StrictEquals(env, rstLhsValue, rstRhsValue, nullptr);
40 if (status == JSVM_OK) {
41 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest1: OH_JSVM_StrictEquals Failed");
42 return nullptr;
43 }
44
45 bool result = true;
46 JSVM_Value value = nullptr;
47 OH_JSVM_GetBoolean(env, result, &value);
48 return value;
49 }
50 //lhs is double,rhs is int,same value,result is not null
TestStrictEqualsTest2(JSVM_Env env,JSVM_CallbackInfo info)51 [[maybe_unused]] JSVM_Value TestStrictEqualsTest2(JSVM_Env env, JSVM_CallbackInfo info)
52 {
53 size_t argc = 1;
54 JSVM_Value argv[1] = {nullptr};
55 OH_JSVM_GetCbInfo(env, info, &argc, argv, nullptr, nullptr);
56
57 double doubleLhs = 333.00;
58 JSVM_Value rstLhsValue = nullptr;
59 int32_t intRhs = 333;
60 JSVM_Value rstRhsValue = nullptr;
61 JSVM_Status status = OH_JSVM_CreateDouble(env, doubleLhs, &rstLhsValue);
62 if (status != JSVM_OK) {
63 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest1: OH_JSVM_CreateInt32 Failed");
64 return nullptr;
65 }
66 status = OH_JSVM_CreateInt32(env, intRhs, &rstRhsValue);
67 if (status != JSVM_OK) {
68 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest1: OH_JSVM_CreateInt32 Failed");
69 return nullptr;
70 }
71 bool bEqualsRst = false;
72 status = OH_JSVM_StrictEquals(env, rstLhsValue, rstRhsValue, &bEqualsRst);
73 if (status != JSVM_OK) {
74 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest1: OH_JSVM_StrictEquals Failed");
75 return nullptr;
76 }
77 if (!bEqualsRst) {
78 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest1: bEqualsRst == false");
79 return nullptr;
80 }
81
82 bool result = true;
83 JSVM_Value value = nullptr;
84 OH_JSVM_GetBoolean(env, result, &value);
85 return value;
86 }
87 //lhs is nullptr, rhs is nullptr, result is not null
TestStrictEqualsTest3(JSVM_Env env,JSVM_CallbackInfo info)88 [[maybe_unused]] JSVM_Value TestStrictEqualsTest3(JSVM_Env env, JSVM_CallbackInfo info)
89 {
90 size_t argc = NUM_SIZE_2;
91 JSVM_Value argv[NUM_SIZE_2] = {nullptr};
92 OH_JSVM_GetCbInfo(env, info, &argc, argv, nullptr, nullptr);
93
94 bool bEqualsRst = false;
95 JSVM_Status status = OH_JSVM_StrictEquals(env, nullptr, nullptr, &bEqualsRst);
96 if (status == JSVM_OK) {
97 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest3: OH_JSVM_StrictEquals Failed");
98 return nullptr;
99 }
100
101 bool result = true;
102 JSVM_Value value = nullptr;
103 OH_JSVM_GetBoolean(env, result, &value);
104 return value;
105 }
106 //lhs is undefined, undefined, result is not null
TestStrictEqualsTest4(JSVM_Env env,JSVM_CallbackInfo info)107 [[maybe_unused]] JSVM_Value TestStrictEqualsTest4(JSVM_Env env, JSVM_CallbackInfo info)
108 {
109 size_t argc = NUM_SIZE_2;
110 JSVM_Value argv[NUM_SIZE_2] = {nullptr};
111 OH_JSVM_GetCbInfo(env, info, &argc, argv, nullptr, nullptr);
112
113 bool bEqualsRst = false;
114 JSVM_Status status = OH_JSVM_StrictEquals(env, argv[0], argv[1], &bEqualsRst);
115 if (status != JSVM_OK) {
116 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest4: OH_JSVM_StrictEquals Failed");
117 return nullptr;
118 }
119 if (!bEqualsRst) {
120 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest4: bEqualsRst == true");
121 return nullptr;
122 }
123
124 bool result = true;
125 JSVM_Value value = nullptr;
126 OH_JSVM_GetBoolean(env, result, &value);
127 return value;
128 }
129 //lhs is set object,rhs is set,same value,result is not null
TestStrictEqualsTest5(JSVM_Env env,JSVM_CallbackInfo info)130 [[maybe_unused]] JSVM_Value TestStrictEqualsTest5(JSVM_Env env, JSVM_CallbackInfo info)
131 {
132 size_t argc = NUM_SIZE_2;
133 JSVM_Value argv[NUM_SIZE_2] = {nullptr};
134 OH_JSVM_GetCbInfo(env, info, &argc, argv, nullptr, nullptr);
135
136 bool bEqualsRst = false;
137 JSVM_Status status = OH_JSVM_StrictEquals(env, argv[0], argv[1], &bEqualsRst);
138 if (status != JSVM_OK) {
139 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest5: OH_JSVM_StrictEquals Failed");
140 return nullptr;
141 }
142 if (!bEqualsRst) {
143 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest5: bEqualsRst is false");
144 return nullptr;
145 }
146
147 bool result = true;
148 JSVM_Value value = nullptr;
149 OH_JSVM_GetBoolean(env, result, &value);
150 return value;
151 }
152 //lhs is boolean,rhs is boolean,same value,result is not null
TestStrictEqualsTest6(JSVM_Env env,JSVM_CallbackInfo info)153 [[maybe_unused]] JSVM_Value TestStrictEqualsTest6(JSVM_Env env, JSVM_CallbackInfo info)
154 {
155 size_t argc = NUM_SIZE_2;
156 JSVM_Value argv[NUM_SIZE_2] = {nullptr};
157 OH_JSVM_GetCbInfo(env, info, &argc, argv, nullptr, nullptr);
158
159 bool bEqualsRst = false;
160 JSVM_Status status = OH_JSVM_StrictEquals(env, argv[0], argv[1], &bEqualsRst);
161 if (status != JSVM_OK) {
162 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest6: OH_JSVM_StrictEquals Failed");
163 return nullptr;
164 }
165 if (!bEqualsRst) {
166 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest6: bEqualsRst is false");
167 return nullptr;
168 }
169
170 bool result = true;
171 JSVM_Value value = nullptr;
172 OH_JSVM_GetBoolean(env, result, &value);
173 return value;
174 }
175 //lhs is string,rhs is string,same value,result is not null
TestStrictEqualsTest7(JSVM_Env env,JSVM_CallbackInfo info)176 [[maybe_unused]] JSVM_Value TestStrictEqualsTest7(JSVM_Env env, JSVM_CallbackInfo info)
177 {
178 size_t argc = NUM_SIZE_2;
179 JSVM_Value argv[NUM_SIZE_2] = {nullptr};
180 OH_JSVM_GetCbInfo(env, info, &argc, argv, nullptr, nullptr);
181
182 bool bEqualsRst = false;
183 JSVM_Status status = OH_JSVM_StrictEquals(env, argv[0], argv[1], &bEqualsRst);
184 if (status != JSVM_OK) {
185 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest7: OH_JSVM_StrictEquals Failed");
186 return nullptr;
187 }
188 if (!bEqualsRst) {
189 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest7: bEqualsRst is false");
190 return nullptr;
191 }
192
193 bool result = true;
194 JSVM_Value value = nullptr;
195 OH_JSVM_GetBoolean(env, result, &value);
196 return value;
197 }
198 //lhs is symbol,rhs is symbol,same value,result is not null
TestStrictEqualsTest8(JSVM_Env env,JSVM_CallbackInfo info)199 [[maybe_unused]] JSVM_Value TestStrictEqualsTest8(JSVM_Env env, JSVM_CallbackInfo info)
200 {
201 size_t argc = NUM_SIZE_2;
202 JSVM_Value argv[NUM_SIZE_2] = {nullptr};
203 OH_JSVM_GetCbInfo(env, info, &argc, argv, nullptr, nullptr);
204
205 bool bEqualsRst = false;
206
207 JSVM_Status status = OH_JSVM_StrictEquals(env, argv[0], argv[1], &bEqualsRst);
208 if (status != JSVM_OK) {
209 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest8: OH_JSVM_StrictEquals Failed");
210 return nullptr;
211 }
212 if (!bEqualsRst) {
213 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest8: bEqualsRst is false");
214 return nullptr;
215 }
216
217 bool result = true;
218 JSVM_Value value = nullptr;
219 OH_JSVM_GetBoolean(env, result, &value);
220 return value;
221 }
222 //lhs is function,rhs is function,same value,result is not null
TestStrictEqualsTest9(JSVM_Env env,JSVM_CallbackInfo info)223 [[maybe_unused]] JSVM_Value TestStrictEqualsTest9(JSVM_Env env, JSVM_CallbackInfo info)
224 {
225 size_t argc = NUM_SIZE_2;
226 JSVM_Value argv[NUM_SIZE_2] = {nullptr};
227 OH_JSVM_GetCbInfo(env, info, &argc, argv, nullptr, nullptr);
228
229 bool bEqualsRst = false;
230 JSVM_Status status = OH_JSVM_StrictEquals(env, argv[0], argv[1], &bEqualsRst);
231 if (status != JSVM_OK) {
232 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest9: OH_JSVM_StrictEquals Failed");
233 return nullptr;
234 }
235 if (!bEqualsRst) {
236 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest9: bEqualsRst is false");
237 return nullptr;
238 }
239
240 bool result = true;
241 JSVM_Value value = nullptr;
242 OH_JSVM_GetBoolean(env, result, &value);
243 return value;
244 }
245 //lhs is bigint ,rhs is bigint ,same value,result is not null,result is true
TestStrictEqualsTest10(JSVM_Env env,JSVM_CallbackInfo info)246 [[maybe_unused]] JSVM_Value TestStrictEqualsTest10(JSVM_Env env, JSVM_CallbackInfo info)
247 {
248 size_t argc = NUM_SIZE_2;
249 JSVM_Value argv[NUM_SIZE_2] = {nullptr};
250 OH_JSVM_GetCbInfo(env, info, &argc, argv, nullptr, nullptr);
251
252 bool bEqualsRst = false;
253 JSVM_Status status = OH_JSVM_StrictEquals(env, argv[0], argv[1], &bEqualsRst);
254 if (status != JSVM_OK) {
255 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest10: OH_JSVM_StrictEquals Failed");
256 return nullptr;
257 }
258 if (!bEqualsRst) {
259 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest10: bEqualsRst is false");
260 return nullptr;
261 }
262
263 bool result = true;
264 JSVM_Value value = nullptr;
265 OH_JSVM_GetBoolean(env, result, &value);
266 return value;
267 }
268 //lhs is regexp ,rhs is regexp ,same value,result is not null,result is true--待确认
TestStrictEqualsTest11(JSVM_Env env,JSVM_CallbackInfo info)269 [[maybe_unused]] JSVM_Value TestStrictEqualsTest11(JSVM_Env env, JSVM_CallbackInfo info)
270 {
271 size_t argc = NUM_SIZE_2;
272 JSVM_Value argv[NUM_SIZE_2] = {nullptr};
273 OH_JSVM_GetCbInfo(env, info, &argc, argv, nullptr, nullptr);
274
275 bool bEqualsRst = false;
276 JSVM_Status status = OH_JSVM_StrictEquals(env, argv[0], argv[1], &bEqualsRst);
277 if (status != JSVM_OK) {
278 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest11: OH_JSVM_StrictEquals Failed");
279 return nullptr;
280 }
281 if (!bEqualsRst) {
282 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest11: bEqualsRst is false");
283 return nullptr;
284 }
285
286 bool result = true;
287 JSVM_Value value = nullptr;
288 OH_JSVM_GetBoolean(env, result, &value);
289 return value;
290 }
291 //lhs is set ,rhs is set ,different value,result is not null,result is false
TestStrictEqualsTest12(JSVM_Env env,JSVM_CallbackInfo info)292 [[maybe_unused]] JSVM_Value TestStrictEqualsTest12(JSVM_Env env, JSVM_CallbackInfo info)
293 {
294 size_t argc = NUM_SIZE_2;
295 JSVM_Value argv[NUM_SIZE_2] = {nullptr};
296 OH_JSVM_GetCbInfo(env, info, &argc, argv, nullptr, nullptr);
297
298 bool bEqualsRst = false;
299 JSVM_Status status = OH_JSVM_StrictEquals(env, argv[0], argv[1], &bEqualsRst);
300 if (status != JSVM_OK) {
301 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest12: OH_JSVM_StrictEquals Failed");
302 return nullptr;
303 }
304 if (bEqualsRst) {
305 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest12: bEqualsRst is true");
306 return nullptr;
307 }
308
309 bool result = true;
310 JSVM_Value value = nullptr;
311 OH_JSVM_GetBoolean(env, result, &value);
312 return value;
313 }
314 //lhs is boolean ,rhs is boolean ,different value,result is not null,result is false
TestStrictEqualsTest13(JSVM_Env env,JSVM_CallbackInfo info)315 [[maybe_unused]] JSVM_Value TestStrictEqualsTest13(JSVM_Env env, JSVM_CallbackInfo info)
316 {
317 size_t argc = NUM_SIZE_2;
318 JSVM_Value argv[NUM_SIZE_2] = {nullptr};
319 OH_JSVM_GetCbInfo(env, info, &argc, argv, nullptr, nullptr);
320
321 bool bEqualsRst = false;
322 JSVM_Status status = OH_JSVM_StrictEquals(env, argv[0], argv[1], &bEqualsRst);
323 if (status != JSVM_OK) {
324 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest13: OH_JSVM_StrictEquals Failed");
325 return nullptr;
326 }
327 if (bEqualsRst) {
328 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest13: bEqualsRst is true");
329 return nullptr;
330 }
331
332 bool result = true;
333 JSVM_Value value = nullptr;
334 OH_JSVM_GetBoolean(env, result, &value);
335 return value;
336 }
337 //lhs is string ,rhs is string ,different value,result is not null. result is false
TestStrictEqualsTest14(JSVM_Env env,JSVM_CallbackInfo info)338 [[maybe_unused]] JSVM_Value TestStrictEqualsTest14(JSVM_Env env, JSVM_CallbackInfo info)
339 {
340 size_t argc = NUM_SIZE_2;
341 JSVM_Value argv[NUM_SIZE_2] = {nullptr};
342 OH_JSVM_GetCbInfo(env, info, &argc, argv, nullptr, nullptr);
343
344 bool bEqualsRst = false;
345 JSVM_Status status = OH_JSVM_StrictEquals(env, argv[0], argv[1], &bEqualsRst);
346 if (status != JSVM_OK) {
347 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest14: OH_JSVM_StrictEquals Failed");
348 return nullptr;
349 }
350 if (bEqualsRst) {
351 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest14: bEqualsRst is true");
352 return nullptr;
353 }
354
355 bool result = true;
356 JSVM_Value value = nullptr;
357 OH_JSVM_GetBoolean(env, result, &value);
358 return value;
359 }
360 //lhs is symbol ,rhs分别 is symbol ,different value,result is not null,result is false
TestStrictEqualsTest15(JSVM_Env env,JSVM_CallbackInfo info)361 [[maybe_unused]] JSVM_Value TestStrictEqualsTest15(JSVM_Env env, JSVM_CallbackInfo info)
362 {
363 size_t argc = NUM_SIZE_2;
364 JSVM_Value argv[NUM_SIZE_2] = {nullptr};
365 OH_JSVM_GetCbInfo(env, info, &argc, argv, nullptr, nullptr);
366
367 bool bEqualsRst = false;
368 JSVM_Status status = OH_JSVM_StrictEquals(env, argv[0], argv[1], &bEqualsRst);
369 if (status != JSVM_OK) {
370 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest15: OH_JSVM_StrictEquals Failed");
371 return nullptr;
372 }
373 if (bEqualsRst) {
374 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest15: bEqualsRst is true");
375 return nullptr;
376 }
377
378 bool result = true;
379 JSVM_Value value = nullptr;
380 OH_JSVM_GetBoolean(env, result, &value);
381 return value;
382 }
383 //lhs is function ,rhs is function ,different value,result is not null,result is false
TestStrictEqualsTest16(JSVM_Env env,JSVM_CallbackInfo info)384 [[maybe_unused]] JSVM_Value TestStrictEqualsTest16(JSVM_Env env, JSVM_CallbackInfo info)
385 {
386 size_t argc = NUM_SIZE_2;
387 JSVM_Value argv[NUM_SIZE_2] = {nullptr};
388 OH_JSVM_GetCbInfo(env, info, &argc, argv, nullptr, nullptr);
389
390 bool bEqualsRst = false;
391 JSVM_Status status = OH_JSVM_StrictEquals(env, argv[0], argv[1], &bEqualsRst);
392 if (status != JSVM_OK) {
393 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest16: OH_JSVM_StrictEquals Failed");
394 return nullptr;
395 }
396 if (bEqualsRst) {
397 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest16: bEqualsRst is true");
398 return nullptr;
399 }
400
401 bool result = true;
402 JSVM_Value value = nullptr;
403 OH_JSVM_GetBoolean(env, result, &value);
404 return value;
405 }
406 //lhs is bigint ,rhs is bigint ,different value同,result is not null,result is false
TestStrictEqualsTest17(JSVM_Env env,JSVM_CallbackInfo info)407 [[maybe_unused]] JSVM_Value TestStrictEqualsTest17(JSVM_Env env, JSVM_CallbackInfo info)
408 {
409 size_t argc = NUM_SIZE_2;
410 JSVM_Value argv[NUM_SIZE_2] = {nullptr};
411 OH_JSVM_GetCbInfo(env, info, &argc, argv, nullptr, nullptr);
412
413 bool bEqualsRst = false;
414 JSVM_Status status = OH_JSVM_StrictEquals(env, argv[0], argv[1], &bEqualsRst);
415 if (status != JSVM_OK) {
416 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest17: OH_JSVM_StrictEquals Failed");
417 return nullptr;
418 }
419 if (bEqualsRst) {
420 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest17: bEqualsRst is true");
421 return nullptr;
422 }
423
424 bool result = true;
425 JSVM_Value value = nullptr;
426 OH_JSVM_GetBoolean(env, result, &value);
427 return value;
428 }
429 //lhs is regexp ,rhs is regexp ,different value,result is not null, result is false
TestStrictEqualsTest18(JSVM_Env env,JSVM_CallbackInfo info)430 [[maybe_unused]] JSVM_Value TestStrictEqualsTest18(JSVM_Env env, JSVM_CallbackInfo info)
431 {
432 size_t argc = NUM_SIZE_2;
433 JSVM_Value argv[NUM_SIZE_2] = {nullptr};
434 OH_JSVM_GetCbInfo(env, info, &argc, argv, nullptr, nullptr);
435
436 bool bEqualsRst = false;
437 JSVM_Status status = OH_JSVM_StrictEquals(env, argv[0], argv[1], &bEqualsRst);
438 if (status != JSVM_OK) {
439 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest18: OH_JSVM_StrictEquals Failed");
440 return nullptr;
441 }
442 if (bEqualsRst) {
443 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest18: bEqualsRst is true");
444 return nullptr;
445 }
446
447 bool result = true;
448 JSVM_Value value = nullptr;
449 OH_JSVM_GetBoolean(env, result, &value);
450 return value;
451 }
452 //lhs is null, rhs is null, result is not null
TestStrictEqualsTest19(JSVM_Env env,JSVM_CallbackInfo info)453 [[maybe_unused]] JSVM_Value TestStrictEqualsTest19(JSVM_Env env, JSVM_CallbackInfo info)
454 {
455 size_t argc = NUM_SIZE_2;
456 JSVM_Value argv[NUM_SIZE_2] = {nullptr};
457 OH_JSVM_GetCbInfo(env, info, &argc, argv, nullptr, nullptr);
458
459 bool bEqualsRst = false;
460 JSVM_Status status = OH_JSVM_StrictEquals(env, argv[0], argv[1], &bEqualsRst);
461 if (status != JSVM_OK) {
462 OH_JSVM_ThrowError(env, nullptr, "TestStrictEqualsTest19: OH_JSVM_StrictEquals Failed");
463 return nullptr;
464 }
465
466 bool result = true;
467 JSVM_Value value = nullptr;
468 OH_JSVM_GetBoolean(env, result, &value);
469 return value;
470 }