• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2025 Huawei Device 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
16function testBoolean() {
17    return new Boolean();
18}
19function testNumber() {
20    return new Number();
21}
22function testProxy() {
23    const handler = {};
24    return new Proxy({}, handler);
25}
26function testDate() {
27    return new Date();
28}
29function testArray() {
30    return new Array();
31}
32function testSet() {
33    return new Set();
34}
35function testMap() {
36    return new Map();
37}
38function testObject() {
39    return new Object();
40}
41function testError() {
42    return new Error();
43}
44function testInt8Array() {
45    return new Int8Array();
46}
47function testUint8Array() {
48    return new Uint8Array();
49}
50function testUint8ClampedArray() {
51    return new Uint8ClampedArray();
52}
53function testInt16Array() {
54    return new Int16Array();
55}
56function testUint16Array() {
57    return new Uint16Array();
58}
59function testInt32Array() {
60    return new Int32Array();
61}
62function testUint32Array() {
63    return new Uint32Array();
64}
65function testFloat32Array() {
66    return new Float32Array();
67}
68function testFloat64Array() {
69    return new Float64Array();
70}
71function testBigInt64Array() {
72    return new BigInt64Array();
73}
74function testBigUint64Array() {
75    return new BigUint64Array();
76}
77
78testBoolean();
79testNumber();
80testProxy();
81testDate();
82testArray();
83testSet();
84testMap();
85testObject();
86testError();
87testInt8Array();
88testUint8Array();
89testUint8ClampedArray();
90testInt16Array();
91testUint16Array();
92testInt32Array();
93testUint32Array();
94testFloat32Array();
95testFloat64Array();
96testBigInt64Array();
97testBigUint64Array();
98
99class C {};
100
101if(ArkTools.isAOTCompiled(testBoolean)) Boolean = C;
102if(ArkTools.isAOTCompiled(testNumber)) Number = C;
103if(ArkTools.isAOTCompiled(testProxy)) Proxy = C;
104if(ArkTools.isAOTCompiled(testDate)) Date = C;
105if(ArkTools.isAOTCompiled(testArray)) Array = C;
106if(ArkTools.isAOTCompiled(testSet)) Set = C;
107if(ArkTools.isAOTCompiled(testMap)) Map = C;
108if(ArkTools.isAOTCompiled(testObject)) Object = C;
109if(ArkTools.isAOTCompiled(testError)) Error = C;
110if(ArkTools.isAOTCompiled(testInt8Array)) Int8Array = C;
111if(ArkTools.isAOTCompiled(testUint8Array)) Uint8Array = C;
112if(ArkTools.isAOTCompiled(testUint8ClampedArray)) Uint8ClampedArray = C;
113if(ArkTools.isAOTCompiled(testInt16Array)) Int16Array = C;
114if(ArkTools.isAOTCompiled(testUint16Array)) Uint16Array = C;
115if(ArkTools.isAOTCompiled(testInt32Array)) Int32Array = C;
116if(ArkTools.isAOTCompiled(testUint32Array)) Uint32Array = C;
117if(ArkTools.isAOTCompiled(testFloat32Array)) Float32Array = C;
118if(ArkTools.isAOTCompiled(testFloat64Array)) Float64Array = C;
119if(ArkTools.isAOTCompiled(testBigInt64Array)) BigInt64Array = C;
120if(ArkTools.isAOTCompiled(testBigUint64Array)) BigUint64Array = C;
121
122testBoolean();
123testNumber();
124testProxy();
125testDate();
126testArray();
127testSet();
128testMap();
129testObject();
130testError();
131testInt8Array();
132testUint8Array();
133testUint8ClampedArray();
134testInt16Array();
135testUint16Array();
136testInt32Array();
137testUint32Array();
138testFloat32Array();
139testFloat64Array();
140testBigInt64Array();
141testBigUint64Array();
142