• 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 
16 #ifndef JSVM_XTS_NAPI_DATATYPE_TEST_H
17 #define JSVM_XTS_NAPI_DATATYPE_TEST_H
18 #include "jsvm.h"
19 #include "jsvm_common.h"
20 #include "native_common.h"
21 #include "test_entry.h"
22 #include "securec.h"
23 #include <cstdint>
24 #include <cstdio>
25 #include <cstdlib>
26 #include <ctime>
27 #include <thread>
28 #include <uv.h>
29 #include <bits/alltypes.h>
30 #include <unistd.h>
31 #include <cstring>
32 #include <fstream>
33 #include <string>
34 #include <vector>
35 using namespace std;
36 //Init
37 JSVM_Value TestInitTest1(JSVM_Env env, JSVM_CallbackInfo info);
38 //CreateVM
39 JSVM_Value TestCreateVMTest1(JSVM_Env env, JSVM_CallbackInfo info);
40 JSVM_Value TestCreateVMTest2(JSVM_Env env, JSVM_CallbackInfo info);
41 //DestroyVM
42 JSVM_Value TestDestroyVMTest1(JSVM_Env env, JSVM_CallbackInfo info);
43 JSVM_Value TestDestroyVMTest2(JSVM_Env env, JSVM_CallbackInfo info);
44 //OpenVMScope
45 JSVM_Value TestOpenVMScopeTest1(JSVM_Env env, JSVM_CallbackInfo info);
46 JSVM_Value TestOpenVMScopeTest2(JSVM_Env env, JSVM_CallbackInfo info);
47 //CloseVMScope
48 JSVM_Value TestCloseVMScopeTest1(JSVM_Env env, JSVM_CallbackInfo info);
49 JSVM_Value TestCloseVMScopeTest2(JSVM_Env env, JSVM_CallbackInfo info);
50 //CreateEnv
51 JSVM_Value TestCreateEnvTest1(JSVM_Env env, JSVM_CallbackInfo info);
52 JSVM_Value TestCreateEnvTest2(JSVM_Env env, JSVM_CallbackInfo info);
53 //DestroyEnv
54 JSVM_Value TestDestroyEnvTest1(JSVM_Env env, JSVM_CallbackInfo info);
55 JSVM_Value TestDestroyEnvTest2(JSVM_Env env, JSVM_CallbackInfo info);
56 //OpenEnvScope
57 JSVM_Value TestOpenEnvScopeTest1(JSVM_Env env, JSVM_CallbackInfo info);
58 JSVM_Value TestOpenEnvScopeTest2(JSVM_Env env, JSVM_CallbackInfo info);
59 JSVM_Value TestOpenEnvScopeTest3(JSVM_Env env, JSVM_CallbackInfo info);
60 //CloseEnvScope
61 JSVM_Value TestCloseEnvScopeTest1(JSVM_Env env, JSVM_CallbackInfo info);
62 JSVM_Value TestCloseEnvScopeTest2(JSVM_Env env, JSVM_CallbackInfo info);
63 //Combination:OH_JSVM_Init -- create vm -- open vm scope -- create env -- open env scope -- open handlescope
64 //-- close handlescope -- close env scope -- destroy env -- close vm scope -- destroy vm
65 JSVM_Value TestDataTypeCombinationTest1(JSVM_Env env, JSVM_CallbackInfo info);
66 #endif //JSVM_XTS_NAPI_DATATYPE_TEST_H
67