• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifndef JSVM_XTS_NAPI_STRING_TEST_H
16 #define JSVM_XTS_NAPI_STRING_TEST_H
17 #include "jsvm.h"
18 #include "jsvm_common.h"
19 #include "native_common.h"
20 #include "test_entry.h"
21 #include "securec.h"
22 #include <cstdint>
23 #include <cstdio>
24 #include <cstdlib>
25 #include <ctime>
26 #include <thread>
27 #include <uv.h>
28 #include <bits/alltypes.h>
29 #include <unistd.h>
30 #include <cstring>
31 #include <fstream>
32 #include <string>
33 #include <vector>
34 using namespace std;
35 
36 // OH_JSVM_GetValueStringUtf8 interface
37 JSVM_Value TestGetValueStringUtf8Test1(JSVM_Env env, JSVM_CallbackInfo info);
38 JSVM_Value TestGetValueStringUtf8Test2(JSVM_Env env, JSVM_CallbackInfo info);
39 JSVM_Value TestGetValueStringUtf8Test3(JSVM_Env env, JSVM_CallbackInfo info);
40 JSVM_Value TestGetValueStringUtf8Test4(JSVM_Env env, JSVM_CallbackInfo info);
41 JSVM_Value TestGetValueStringUtf8Test5(JSVM_Env env, JSVM_CallbackInfo info);
42 JSVM_Value TestGetValueStringUtf8Test6(JSVM_Env env, JSVM_CallbackInfo info);
43 
44 // OH_JSVM_CreateStringUtf8 interface
45 JSVM_Value TestCreateStringUtf8Test1(JSVM_Env env, JSVM_CallbackInfo info);
46 JSVM_Value TestCreateStringUtf8Test2(JSVM_Env env, JSVM_CallbackInfo info);
47 JSVM_Value TestCreateStringUtf8Test3(JSVM_Env env, JSVM_CallbackInfo info);
48 JSVM_Value TestCreateStringUtf8Test4(JSVM_Env env, JSVM_CallbackInfo info);
49 
50 // OH_JSVM_CreateStringUtf16 interface
51 JSVM_Value TestCreateStringUtf16Test1(JSVM_Env env, JSVM_CallbackInfo info);
52 JSVM_Value TestCreateStringUtf16Test2(JSVM_Env env, JSVM_CallbackInfo info);
53 JSVM_Value TestCreateStringUtf16Test3(JSVM_Env env, JSVM_CallbackInfo info);
54 JSVM_Value TestCreateStringUtf16Test4(JSVM_Env env, JSVM_CallbackInfo info);
55 
56 //OH_JSVM_GetValueStringUtf16 interface
57 JSVM_Value TestGetValueStringUtf16Test1(JSVM_Env env, JSVM_CallbackInfo info);
58 JSVM_Value TestGetValueStringUtf16Test2(JSVM_Env env, JSVM_CallbackInfo info);
59 JSVM_Value TestGetValueStringUtf16Test3(JSVM_Env env, JSVM_CallbackInfo info);
60 JSVM_Value TestGetValueStringUtf16Test4(JSVM_Env env, JSVM_CallbackInfo info);
61 JSVM_Value TestGetValueStringUtf16Test5(JSVM_Env env, JSVM_CallbackInfo info);
62 JSVM_Value TestGetValueStringUtf16Test6(JSVM_Env env, JSVM_CallbackInfo info);
63 
64 // OH_JSVM_CreateStringLatin1 interface
65 JSVM_Value TestCreateStringLatin1Test1(JSVM_Env env, JSVM_CallbackInfo info);
66 JSVM_Value TestCreateStringLatin1Test2(JSVM_Env env, JSVM_CallbackInfo info);
67 JSVM_Value TestCreateStringLatin1Test3(JSVM_Env env, JSVM_CallbackInfo info);
68 JSVM_Value TestCreateStringLatin1Test4(JSVM_Env env, JSVM_CallbackInfo info);
69 
70 // OH_JSVM_GetValueStringLatin1 interface
71 JSVM_Value TestGetValueStringLatin1Test1(JSVM_Env env, JSVM_CallbackInfo info);
72 JSVM_Value TestGetValueStringLatin1Test2(JSVM_Env env, JSVM_CallbackInfo info);
73 JSVM_Value TestGetValueStringLatin1Test3(JSVM_Env env, JSVM_CallbackInfo info);
74 JSVM_Value TestGetValueStringLatin1Test4(JSVM_Env env, JSVM_CallbackInfo info);
75 JSVM_Value TestGetValueStringLatin1Test5(JSVM_Env env, JSVM_CallbackInfo info);
76 JSVM_Value TestGetValueStringLatin1Test6(JSVM_Env env, JSVM_CallbackInfo info);
77 
78 // OH_JSVM_IsString interface
79 JSVM_Value TestIsStringTest1(JSVM_Env env, JSVM_CallbackInfo info);
80 JSVM_Value TestIsStringTest2(JSVM_Env env, JSVM_CallbackInfo info);
81 JSVM_Value TestIsStringTest3(JSVM_Env env, JSVM_CallbackInfo info);
82 
83 // combination interface
84 JSVM_Value TestOtherTest1(JSVM_Env env, JSVM_CallbackInfo info);
85 #endif //JSVM_XTS_NAPI_STRING_TEST_H