• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 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 
16 #ifndef ECMASCRIPT_TOOLING_TEST_UTILS_TESTCASES_JS_VARIABLE_TEST_H
17 #define ECMASCRIPT_TOOLING_TEST_UTILS_TESTCASES_JS_VARIABLE_TEST_H
18 
19 #include "test/utils/test_util.h"
20 
21 namespace panda::ecmascript::tooling::test {
22 class JsVariableFirstTest : public TestEvents {
23 public:
JsVariableFirstTest()24     JsVariableFirstTest()
25     {
26         breakpoint = [this](const JSPtLocation &location) {
27             ASSERT_TRUE(location.GetMethodId().IsValid());
28             ASSERT_LOCATION_EQ(location, location_);
29             ++breakpointCounter_;
30             debugger_->NotifyPaused(location, PauseReason::INSTRUMENTATION);
31             TestUtil::SuspendUntilContinue(DebugEvent::BREAKPOINT, location);
32             return true;
33         };
34 
35         loadModule = [this](std::string_view moduleName) {
36             std::string pandaFile = DEBUGGER_ABC_DIR "variable_first.abc";
37             std::string sourceFile = DEBUGGER_JS_DIR "variable_first.js";
38             static_cast<JsVariableFirstTestChannel *>(channel_)->Initial(vm_, runtime_);
39             runtime_->Enable();
40             // 306: breakpointer line
41             int32_t lineNumber = 314;
42             location_ = TestUtil::GetLocation(sourceFile.c_str(), lineNumber, 0, pandaFile.c_str());
43             ASSERT_TRUE(location_.GetMethodId().IsValid());
44             TestUtil::SuspendUntilContinue(DebugEvent::LOAD_MODULE);
45             ASSERT_EQ(moduleName, pandaFile);
46             ASSERT_TRUE(debugger_->NotifyScriptParsed(0, pandaFile));
47             auto condFuncRef = FunctionRef::Undefined(vm_);
48             auto ret = debugInterface_->SetBreakpoint(location_, condFuncRef);
49             ASSERT_TRUE(ret);
50             return true;
51         };
52 
53         scenario = [this]() {
54             TestUtil::WaitForLoadModule();
55             TestUtil::Continue();
56             TestUtil::WaitForBreakpoint(location_);
57             TestUtil::Continue();
58             auto ret = debugInterface_->RemoveBreakpoint(location_);
59             ASSERT_TRUE(ret);
60             ASSERT_EXITED();
61             return true;
62         };
63 
64         vmDeath = [this]() {
65             ASSERT_EQ(breakpointCounter_, 1U);  // 1: break point counter
66             return true;
67         };
68 
69         channel_ = new JsVariableFirstTestChannel();
70     }
71 
GetEntryPoint()72     std::pair<std::string, std::string> GetEntryPoint() override
73     {
74         std::string pandaFile = DEBUGGER_ABC_DIR "variable_first.abc";
75         return {pandaFile, entryPoint_};
76     }
~JsVariableFirstTest()77     ~JsVariableFirstTest()
78     {
79         delete channel_;
80         channel_ = nullptr;
81     }
82 
83 private:
84     class JsVariableFirstTestChannel : public TestChannel {
85     public:
86         JsVariableFirstTestChannel() = default;
87         ~JsVariableFirstTestChannel() = default;
Initial(const EcmaVM * vm,RuntimeImpl * runtime)88         void Initial(const EcmaVM *vm, RuntimeImpl *runtime)
89         {
90             vm_ = vm;
91             runtime_ = runtime;
92         }
93 
SendNotification(const PtBaseEvents & events)94         void SendNotification(const PtBaseEvents &events) override
95         {
96             const static std::vector<std::function<bool(const PtBaseEvents &events)>> eventList = {
97                 [](const PtBaseEvents &events) -> bool {
98                     std::string sourceFile = DEBUGGER_JS_DIR "variable_first.js";
99                     auto parsed = static_cast<const ScriptParsed *>(&events);
100                     std::string str = parsed->ToJson()->Stringify();
101                     std::cout << "JsVariableFirstTestChannel: SendNotification 0:\n" << str << std::endl;
102 
103                     ASSERT_EQ(parsed->GetName(), "Debugger.scriptParsed");
104                     ASSERT_EQ(parsed->GetUrl(), sourceFile);
105                     return true;
106                 },
107                 [this](const PtBaseEvents &events) -> bool {
108                     auto paused = static_cast<const Paused *>(&events);
109                     std::string str = paused->ToJson()->Stringify();
110                     std::cout << "JsVariableFirstTestChannel: SendNotification 1:\n" << str << std::endl;
111 
112                     ASSERT_EQ(paused->GetName(), "Debugger.paused");
113                     auto frame = paused->GetCallFrames()->at(0).get();
114                     ASSERT_EQ(frame->GetFunctionName(), "resolveHandler");
115                     auto scopes = frame->GetScopeChain();
116                     ASSERT_EQ(scopes->size(), 3U);  // 2: contain local, global and closure
117                     for (uint32_t i = 0; i < scopes->size(); i++) {
118                         auto scope = scopes->at(i).get();
119                         if (scope->GetType() != Scope::Type::Local()) {
120                             continue;
121                         }
122                         auto localId = scope->GetObject()->GetObjectId();
123                         GetPropertiesParams params;
124                         params.SetObjectId(localId).SetOwnProperties(true);
125                         std::vector<std::unique_ptr<PropertyDescriptor>> outPropertyDesc;
126                         runtime_->GetProperties(params, &outPropertyDesc, {}, {}, {});
127                         for (const auto &property : outPropertyDesc) {
128                             std::cout << "=====================================" << std::endl;
129                             std::cout << property->GetName() << std::endl;
130                             auto value = property->GetValue();
131                             std::vector<std::string> infos;
132                             PushValueInfo(value, infos);
133                             if (value->GetType() == RemoteObject::TypeName::Object) {
134                                 std::vector<std::unique_ptr<PropertyDescriptor>> outPropertyDescInner;
135                                 ASSERT_TRUE(value->HasObjectId());
136                                 params.SetObjectId(value->GetObjectId()).SetOwnProperties(true);
137                                 runtime_->GetProperties(params, &outPropertyDescInner, {}, {}, {});
138                                 if (outPropertyDescInner.size() == 0) {
139                                     infos.push_back("none");
140                                 }
141                                 for (const auto &propertyInner : outPropertyDescInner) {
142                                     std::cout << "###########################################" << std::endl;
143                                     std::cout << propertyInner->GetName() << std::endl;
144                                     infos.push_back(propertyInner->GetName());
145                                     auto innerValue = propertyInner->GetValue();
146                                     PushValueInfo(innerValue, infos);
147                                 }
148                             }
149                             ASSERT_EQ(infos.size(), variableMap_.at(property->GetName()).size());
150                             for (uint32_t j = 0; j < infos.size(); j++) {
151                                 ASSERT_EQ(infos[j], variableMap_.at(property->GetName())[j]);
152                             }
153                         }
154                     }
155                     return true;
156                 }
157             };
158 
159             ASSERT_TRUE(eventList[index_](events));
160             index_++;
161         }
162 
163     private:
164         NO_COPY_SEMANTIC(JsVariableFirstTestChannel);
165         NO_MOVE_SEMANTIC(JsVariableFirstTestChannel);
166 
PushValueInfo(RemoteObject * value,std::vector<std::string> & infos)167         void PushValueInfo(RemoteObject *value, std::vector<std::string> &infos)
168         {
169             std::cout << "type: " << value->GetType() << std::endl;
170             infos.push_back(value->GetType());
171             if (value->HasObjectId()) {
172                 std::cout << "id: " << value->GetObjectId() << std::endl;
173             }
174             if (value->HasSubType()) {
175                 std::cout << "sub type: " << value->GetSubType() << std::endl;
176                 infos.push_back(value->GetSubType());
177             }
178             if (value->HasClassName()) {
179                 std::cout << "class name: " << value->GetClassName() << std::endl;
180                 infos.push_back(value->GetClassName());
181             }
182             if (value->HasDescription()) {
183                 std::cout << "desc: " << value->GetDescription() << std::endl;
184                 infos.push_back(value->GetDescription());
185             }
186             if (value->HasValue()) {
187                 std::cout << "type: " <<
188                     value->GetValue()->Typeof(vm_)->ToString() << std::endl;
189                 std::cout << "tostring: " <<
190                     value->GetValue()->ToString(vm_)->ToString() << std::endl;
191                 infos.push_back(value->GetValue()->ToString(vm_)->ToString());
192             }
193         }
194 
195         /*
196         * Expect map type: map<name, value list>
197         * value list (optional):
198         *    type
199         *    subType
200         *    className
201         *    description
202         *    value tostring
203         *
204         * if is object value, will push back key and value.
205         *
206         * for example:
207         * var abc = 1
208         *     { "abc", { "number", "1", "1" } }
209         * var obj = { "key": "2" }
210         *     { "obj0", { "object", "Object", "Object", "[object Object]", "key", "string", "2", "2" } }
211         */
212         const std::map<std::string, std::vector<std::string>> variableMap_ = {
213             { "nop", { "undefined" } },
214             { "foo", { "function", "Function", "function foo( { [js code] }",
215                        "Cannot get source code of funtion"} },
216             { "string0", { "string", "helloworld", "helloworld" } },
217             { "boolean0", { "object", "Object", "Boolean{[[PrimitiveValue]]: false}", "false", "[[PrimitiveValue]]",
218                             "boolean", "false", "false" } },
219             { "number0", { "number", "1", "1" } },
220             { "obj0", { "object", "Object", "Object", "[object Object]",
221                         "key0", "string", "value0", "value0",
222                         "key1", "number", "100", "100" } },
223             { "arraybuffer0", { "object", "arraybuffer", "Arraybuffer", "ArrayBuffer(24)", "[object ArrayBuffer]",
224                                 "[[Int8Array]]", "object", "Object", "Int8Array(24)",
225                                 "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0", "[[Uint8Array]]", "object",
226                                 "Object", "Uint8Array(24)", "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0",
227                                 "[[Uint8ClampedArray]]", "object", "Object", "Object",
228                                 "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0", "[[Int16Array]]", "object",
229                                 "Object", "Int16Array(12)", "0,0,0,0,0,0,0,0,0,0,0,0", "[[Uint16Array]]", "object",
230                                 "Object", "Object", "0,0,0,0,0,0,0,0,0,0,0,0", "[[Int32Array]]", "object", "Object",
231                                 "Int32Array(6)", "0,0,0,0,0,0", "[[Uint32Array]]", "object", "Object", "Object",
232                                 "0,0,0,0,0,0", "[[Float32Array]]", "object", "Object", "Object", "0,0,0,0,0,0",
233                                 "[[Float64Array]]", "object", "Object", "Object", "0,0,0", "[[BigInt64Array]]",
234                                 "object", "Object", "Object", "0,0,0", "[[BigUint64Array]]", "object", "Object",
235                                 "Object", "0,0,0" } },
236             { "function0", { "function", "Function", "function function0( { [js code] }",
237                              "Cannot get source code of funtion" } },
238             { "generator0", { "function", "Generator", "function* generator0( { [js code] }",
239                               "Cannot get source code of funtion" } },
240             { "map0", { "object", "map", "Map", "Map(0)", "[object Map]", "size", "number", "0", "0", "[[Entries]]",
241                         "object", "array", "Array", "Array(0)", "" } },
242             { "set0", { "object", "set", "Set", "Set(0)", "[object Set]", "size", "number", "0", "0", "[[Entries]]",
243                         "object", "array", "Array", "Array(0)", "" } },
244             { "undefined0", { "undefined" } },
245             { "array0", { "object", "array", "Array", "Array(2)", "Apple,Banana", "0", "string", "Apple", "Apple",
246                           "1", "string", "Banana", "Banana", "length", "number", "2", "2" } },
247             { "regexp0", { "object", "regexp", "RegExp", "/^\\d+\\.\\d+$/i", "/^\\d+\\.\\d+$/i", "global", "boolean",
248                            "false", "false", "ignoreCase", "boolean", "true", "true", "multiline", "boolean", "false",
249                            "false", "dotAll", "boolean", "false", "false", "hasIndices", "boolean", "false", "false",
250                            "unicode", "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags",
251                            "string", "i", "i", "source", "string", "^\\d+\\.\\d+$", "^\\d+\\.\\d+$", "lastIndex",
252                            "number", "0", "0" } },
253             { "uint8array0", { "object", "Object", "Uint8Array(24)",
254                                "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0", "0", "number", "0", "0",
255                                "1", "number", "0", "0", "2", "number", "0", "0", "3", "number", "0", "0", "4",
256                                "number", "0", "0", "5", "number", "0", "0", "6", "number", "0", "0", "7",
257                                "number", "0", "0", "8", "number", "0", "0", "9", "number", "0", "0", "10",
258                                "number", "0", "0", "11", "number", "0", "0", "12", "number", "0", "0", "13",
259                                "number", "0", "0", "14", "number", "0", "0", "15", "number", "0", "0", "16",
260                                "number", "0", "0", "17", "number", "0", "0", "18", "number", "0", "0", "19",
261                                "number", "0", "0", "20", "number", "0", "0", "21", "number", "0", "0", "22",
262                                "number", "0", "0", "23", "number", "0", "0" } },
263             { "dataview0", { "object", "dataview", "Dataview", "DataView(24)", "[object DataView]", "buffer",
264                              "object", "arraybuffer", "Arraybuffer", "ArrayBuffer(24)", "[object ArrayBuffer]",
265                              "byteLength", "number", "24", "24", "byteOffset", "number", "0", "0" } },
266             { "bigint0", { "bigint", "999n", "999" } },
267             { "typedarray0", { "object", "Object", "Uint8Array(0)", "", "none" } },
268             { "sharedarraybuffer0", { "object", "Object", "SharedArrayBuffer(32)", "[object SharedArrayBuffer]",
269                                       "[[Int8Array]]", "object", "Object", "Int8Array(32)",
270                                       "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0",
271                                       "[[Uint8Array]]", "object", "Object", "Uint8Array(32)",
272                                       "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0",
273                                       "[[Int16Array]]", "object", "Object", "Int16Array(16)",
274                                       "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0", "[[Int32Array]]", "object", "Object",
275                                       "Int32Array(8)", "0,0,0,0,0,0,0,0", "[[ArrayBufferByteLength]]", "number", "32",
276                                       "32", "byteLength", "number", "32", "32" } },
277             { "weakref0", { "object", "Object", "WeakRef {}", "[object WeakRef]", "none" } },
278             { "iterator0", { "function", "Function", "function [Symbol.iterator]( { [native code] }",
279                              "function [Symbol.iterator]() { [native code] }" } },
280             { "set1", { "object", "set", "Set", "Set(1) {1}", "[object Set]", "size", "number", "1", "1",
281                         "[[Entries]]", "object", "array", "Array", "Array(1)", "1" } },
282             { "set2", { "object", "set", "Set", "Set(7) {'h', 'e', 'l', 'o', 'w', ...}", "[object Set]", "size",
283                         "number", "7", "7", "[[Entries]]", "object", "array", "Array", "Array(7)",
284                         "h,e,l,o,w,r,d" } },
285             { "set3", { "object", "set", "Set", "Set(1) {Object}", "[object Set]", "size", "number", "1", "1",
286                         "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } },
287             { "set4", { "object", "set", "Set", "Set(0)", "[object Set]", "size", "number", "0", "0", "[[Entries]]",
288                         "object", "array", "Array", "Array(0)", "" } },
289             { "set5", { "object", "set", "Set", "Set(2) {'Apple', 'Banana'}", "[object Set]", "size", "number", "2",
290                         "2", "[[Entries]]", "object", "array", "Array", "Array(2)", "Apple,Banana" } },
291             { "set6", { "object", "set", "Set", "Set(0)", "[object Set]", "size", "number", "0", "0", "[[Entries]]",
292                         "object", "array", "Array", "Array(0)", "" } },
293             { "set7", { "object", "set", "Set", "Set(0)", "[object Set]", "size", "number", "0", "0", "[[Entries]]",
294                         "object", "array", "Array", "Array(0)", "" } },
295             { "set8", { "object", "set", "Set", "Set(1) {Object}", "[object Set]", "size", "number", "1", "1",
296                         "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } },
297             { "set9", { "object", "set", "Set", "Set(1) {Object}", "[object Set]", "size", "number", "1", "1",
298                         "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } },
299             { "set10", { "object", "set", "Set", "Set(1) {Object}", "[object Set]", "size", "number", "1", "1",
300                          "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } },
301             { "set11", { "object", "set", "Set", "Set(1) {Object}", "[object Set]", "size", "number", "1", "1",
302                          "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } },
303             { "set12", { "object", "set", "Set", "Set(1) {Object}", "[object Set]", "size", "number", "1", "1",
304                          "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } },
305             { "set13", { "object", "set", "Set", "Set(1) {Object}", "[object Set]", "size", "number", "1", "1",
306                          "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } },
307             { "set14", { "object", "set", "Set", "Set(0)", "[object Set]", "size", "number", "0", "0", "[[Entries]]",
308                          "object", "array", "Array", "Array(0)", "" } },
309             { "set15", { "object", "set", "Set", "Set(4) {0, 'hello', Object, 1}", "[object Set]", "size",
310                          "number", "4", "4", "[[Entries]]", "object", "array", "Array", "Array(4)",
311                          "0,hello,[object Object],1" } },
312             { "set16", { "object", "set", "Set", "Set(1) {Object}", "[object Set]", "size", "number", "1", "1",
313                          "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } },
314             { "set17", { "object", "set", "Set", "Set(1) {999}", "[object Set]", "size", "number", "1", "1",
315                          "[[Entries]]", "object", "array", "Array", "Array(1)", "999" } },
316             { "set18", { "object", "set", "Set", "Set(1) {Object}", "[object Set]", "size", "number", "1", "1",
317                          "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } },
318             { "set19", { "object", "set", "Set", "Set(0)", "[object Set]", "size", "number", "0", "0",
319                          "[[Entries]]", "object", "array", "Array", "Array(0)", "" } },
320             { "number1", { "number", "65535", "65535" } },
321             { "number2", { "number", "5e-324", "5e-324" } },
322             { "number3", { "number", "10000000000", "10000000000" } },
323             { "number4", { "number", "2199023255551", "2199023255551" } },
324             { "number5", { "number", "16383", "16383" } },
325             { "number6", { "object", "Object", "Number{[[PrimitiveValue]]: 999}", "999", "[[PrimitiveValue]]",
326                            "number", "999", "999" } },
327             { "number7", { "number", "1.23e+47", "1.23e+47" } },
328             { "number8", { "number", "1", "1" } },
329             { "number9", { "number", "65536", "65536" } },
330             { "number10", { "number", "-65534", "-65534" } },
331             { "number11", { "number", "65535", "65535" } },
332             { "number12", { "number", "0.000015259021896696422", "0.000015259021896696422" } },
333             { "number13", { "number", "1", "1" } },
334             { "number14", { "object", "Object", "Number{[[PrimitiveValue]]: 0}", "0", "[[PrimitiveValue]]", "number",
335                             "0", "0" } },
336             { "number15", { "object", "Object", "Number{[[PrimitiveValue]]: 1.7976931348623157e+308}",
337                             "1.7976931348623157e+308", "[[PrimitiveValue]]", "number", "1.7976931348623157e+308",
338                             "1.7976931348623157e+308" } },
339             { "number16", { "object", "Object", "Number{[[PrimitiveValue]]: 5e-324}", "5e-324", "[[PrimitiveValue]]",
340                             "number", "5e-324", "5e-324" } },
341             { "number17", { "object", "Object", "Number{[[PrimitiveValue]]: 10000000000}", "10000000000",
342                             "[[PrimitiveValue]]", "number", "10000000000", "10000000000" } },
343             { "number18", { "object", "Object", "Number{[[PrimitiveValue]]: 2199023255551}", "2199023255551",
344                             "[[PrimitiveValue]]", "number", "2199023255551", "2199023255551" } },
345             { "number19", { "object", "Object", "Number{[[PrimitiveValue]]: 16383}", "16383", "[[PrimitiveValue]]",
346                             "number", "16383", "16383" } },
347             { "number20", { "object", "Object", "Number{[[PrimitiveValue]]: 1.23e+47}", "1.23e+47",
348                             "[[PrimitiveValue]]", "number", "1.23e+47", "1.23e+47" } },
349             { "number21", { "object", "Object", "Number{[[PrimitiveValue]]: 1}", "1", "[[PrimitiveValue]]", "number",
350                             "1", "1" } },
351             { "number22", { "object", "Object", "Number{[[PrimitiveValue]]: 65536}", "65536", "[[PrimitiveValue]]",
352                             "number", "65536", "65536" } },
353             { "number23", { "object", "Object", "Number{[[PrimitiveValue]]: -65534}", "-65534", "[[PrimitiveValue]]",
354                             "number", "-65534", "-65534" } },
355             { "number24", { "object", "Object", "Number{[[PrimitiveValue]]: 65535}", "65535", "[[PrimitiveValue]]",
356                             "number", "65535", "65535" } },
357             { "number25", { "object", "Object", "Number{[[PrimitiveValue]]: 0.000015259021896696422}",
358                             "0.000015259021896696422", "[[PrimitiveValue]]", "number", "0.000015259021896696422",
359                             "0.000015259021896696422" } },
360             { "number26", { "object", "Object", "Number{[[PrimitiveValue]]: 1}", "1", "[[PrimitiveValue]]", "number",
361                             "1", "1" } },
362             { "number27", { "number", "1.7976931348623157e+308", "1.7976931348623157e+308" } },
363             { "string1", { "string", "", "" } },
364             { "string2", { "string", "", "" } },
365             { "string3", { "string", "world", "world" } },
366             { "string4", { "string", "helloworld", "helloworld" } },
367             { "string5", { "string", "e", "e" } },
368             { "string6", { "string", "1", "1" } },
369             { "string7", { "object", "Object", "String{[[PrimitiveValue]]: }", "", "[[PrimitiveValue]]", "string", "",
370                            "", "length", "number", "0", "0" } },
371             { "string8", { "object", "Object", "String{[[PrimitiveValue]]: [object Set]}", "[object Set]",
372                            "[[PrimitiveValue]]", "string", "[object Set]", "[object Set]", "0", "string", "[", "[",
373                            "1", "string", "o", "o", "2", "string", "b", "b", "3", "string", "j", "j", "4", "string",
374                            "e", "e", "5", "string", "c", "c", "6", "string", "t", "t", "7", "string", " ", " ", "8",
375                            "string", "S", "S", "9", "string", "e", "e", "10", "string", "t", "t", "11", "string", "]",
376                            "]", "length", "number", "12", "12" } },
377             { "string9", { "object", "Object", "String{[[PrimitiveValue]]: 1}", "1", "[[PrimitiveValue]]", "string",
378                            "1", "1", "0", "string", "1", "1", "length", "number", "1", "1" } },
379             { "string10", { "object", "Object", "String{[[PrimitiveValue]]: helloworld}", "helloworld",
380                             "[[PrimitiveValue]]", "string", "helloworld", "helloworld", "0", "string", "h", "h", "1",
381                             "string", "e", "e", "2", "string", "l", "l", "3", "string", "l", "l", "4", "string", "o",
382                             "o", "5", "string", "w", "w", "6", "string", "o", "o", "7", "string", "r", "r", "8",
383                             "string", "l", "l", "9", "string", "d", "d", "length", "number", "10", "10" } },
384             { "string11", { "object", "Object", "String{[[PrimitiveValue]]: [object Object]}", "[object Object]",
385                             "[[PrimitiveValue]]", "string", "[object Object]", "[object Object]", "0", "string", "[",
386                             "[", "1", "string", "o", "o", "2", "string", "b", "b", "3", "string", "j", "j", "4",
387                             "string", "e", "e", "5", "string", "c", "c", "6", "string", "t", "t", "7", "string", " ",
388                             " ", "8", "string", "O", "O", "9", "string", "b", "b", "10", "string", "j", "j", "11",
389                             "string", "e", "e", "12", "string", "c", "c", "13", "string", "t", "t", "14", "string",
390                             "]", "]", "length", "number", "15", "15" } },
391             { "string12", { "object", "Object", "String{[[PrimitiveValue]]: undefined}", "undefined",
392                             "[[PrimitiveValue]]", "string", "undefined", "undefined", "0", "string", "u", "u", "1",
393                             "string", "n", "n", "2", "string", "d", "d", "3", "string", "e", "e", "4", "string", "f",
394                             "f", "5", "string", "i", "i", "6", "string", "n", "n", "7", "string", "e", "e", "8",
395                             "string", "d", "d", "length", "number", "9", "9" } },
396             { "string13", { "object", "Object", "String{[[PrimitiveValue]]: Apple,Banana}", "Apple,Banana",
397                             "[[PrimitiveValue]]", "string", "Apple,Banana", "Apple,Banana", "0", "string", "A", "A",
398                             "1", "string", "p", "p", "2", "string", "p", "p", "3", "string", "l", "l", "4", "string",
399                             "e", "e", "5", "string", ",", ",", "6", "string", "B", "B", "7", "string", "a", "a", "8",
400                             "string", "n", "n", "9", "string", "a", "a", "10", "string", "n", "n", "11", "string",
401                             "a", "a", "length", "number", "12", "12" } },
402             { "string14", { "object", "Object", "String{[[PrimitiveValue]]: 999}", "999", "[[PrimitiveValue]]",
403                             "string", "999", "999", "0", "string", "9", "9", "1", "string", "9", "9", "2", "string",
404                             "9", "9", "length", "number", "3", "3" } },
405             { "string15", { "object", "Object", "String{[[PrimitiveValue]]: Cannot get source code of funtion}",
406                             "Cannot get source code of funtion", "[[PrimitiveValue]]", "string",
407                             "Cannot get source code of funtion", "Cannot get source code of funtion", "0", "string",
408                             "C", "C", "1", "string", "a", "a", "2", "string", "n", "n", "3", "string", "n", "n", "4",
409                             "string", "o", "o", "5", "string", "t", "t", "6", "string", " ", " ", "7", "string", "g",
410                             "g", "8", "string", "e", "e", "9", "string", "t", "t", "10", "string", " ", " ", "11",
411                             "string", "s", "s", "12", "string", "o", "o", "13", "string", "u", "u", "14", "string",
412                             "r", "r", "15", "string", "c", "c", "16", "string", "e", "e", "17", "string", " ", " ",
413                             "18", "string", "c", "c", "19", "string", "o", "o", "20", "string", "d", "d", "21",
414                             "string", "e", "e", "22", "string", " ", " ", "23", "string", "o", "o", "24", "string",
415                             "f", "f", "25", "string", " ", " ", "26", "string", "f", "f", "27", "string", "u", "u",
416                             "28", "string", "n", "n", "29", "string", "t", "t", "30", "string", "i", "i", "31",
417                             "string", "o", "o", "32", "string", "n", "n", "length", "number", "33", "33" } },
418             { "string16", { "object", "Object", "String{[[PrimitiveValue]]: /^\\d+\\.\\d+$/i}", "/^\\d+\\.\\d+$/i",
419                             "[[PrimitiveValue]]", "string", "/^\\d+\\.\\d+$/i", "/^\\d+\\.\\d+$/i", "0", "string", "/",
420                             "/", "1", "string", "^", "^", "2", "string", "\\", "\\", "3", "string", "d", "d", "4",
421                             "string", "+", "+", "5", "string", "\\", "\\", "6", "string", ".", ".", "7", "string",
422                             "\\", "\\", "8", "string", "d", "d", "9", "string", "+", "+", "10", "string", "$", "$",
423                             "11", "string", "/", "/", "12", "string", "i", "i", "length", "number", "13", "13"} },
424             { "string17", { "object", "Object", "String{[[PrimitiveValue]]: [object ArrayBuffer]}",
425                             "[object ArrayBuffer]", "[[PrimitiveValue]]", "string", "[object ArrayBuffer]",
426                             "[object ArrayBuffer]", "0", "string", "[", "[", "1", "string", "o", "o", "2", "string",
427                             "b", "b", "3", "string", "j", "j", "4", "string", "e", "e", "5", "string", "c", "c", "6",
428                             "string", "t", "t", "7", "string", " ", " ", "8", "string", "A", "A", "9", "string", "r",
429                             "r", "10", "string", "r", "r", "11", "string", "a", "a", "12", "string", "y", "y", "13",
430                             "string", "B", "B", "14", "string", "u", "u", "15", "string", "f", "f", "16", "string",
431                             "f", "f", "17", "string", "e", "e", "18", "string", "r", "r", "19", "string", "]", "]",
432                             "length", "number", "20", "20" } },
433             { "string18", { "object", "Object",
434                             "String{[[PrimitiveValue]]: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}",
435                             "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0", "[[PrimitiveValue]]", "string",
436                             "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0",
437                             "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0", "0", "string", "0", "0", "1",
438                             "string", ",", ",", "2", "string", "0", "0", "3", "string", ",", ",", "4", "string", "0",
439                             "0", "5", "string", ",", ",", "6", "string", "0", "0", "7", "string", ",", ",", "8",
440                             "string", "0", "0", "9", "string", ",", ",", "10", "string", "0", "0", "11", "string",
441                             ",", ",", "12", "string", "0", "0", "13", "string", ",", ",", "14", "string", "0", "0",
442                             "15", "string", ",", ",", "16", "string", "0", "0", "17", "string", ",", ",", "18",
443                             "string", "0", "0", "19", "string", ",", ",", "20", "string", "0", "0", "21", "string",
444                             ",", ",", "22", "string", "0", "0", "23", "string", ",", ",", "24", "string", "0", "0",
445                             "25", "string", ",", ",", "26", "string", "0", "0", "27", "string", ",", ",", "28",
446                             "string", "0", "0", "29", "string", ",", ",", "30", "string", "0", "0", "31", "string",
447                             ",", ",", "32", "string", "0", "0", "33", "string", ",", ",", "34", "string", "0", "0",
448                             "35", "string", ",", ",", "36", "string", "0", "0", "37", "string", ",", ",", "38",
449                             "string", "0", "0", "39", "string", ",", ",", "40", "string", "0", "0", "41", "string",
450                             ",", ",", "42", "string", "0", "0", "43", "string", ",", ",", "44", "string", "0", "0",
451                             "45", "string", ",", ",", "46", "string", "0", "0", "length", "number", "47", "47" } },
452             { "string19", { "object", "Object", "String{[[PrimitiveValue]]: [object DataView]}", "[object DataView]",
453                             "[[PrimitiveValue]]", "string", "[object DataView]", "[object DataView]",
454                             "0", "string", "[", "[", "1", "string", "o", "o", "2", "string", "b", "b", "3", "string",
455                             "j", "j", "4", "string", "e", "e", "5", "string", "c", "c", "6", "string", "t", "t", "7",
456                             "string", " ", " ", "8", "string", "D", "D", "9", "string", "a", "a", "10", "string", "t",
457                             "t", "11", "string", "a", "a", "12", "string", "V", "V", "13", "string", "i", "i", "14",
458                             "string", "e", "e", "15", "string", "w", "w", "16", "string", "]", "]", "length", "number",
459                             "17", "17" } },
460             { "string20", { "object", "Object", "String{[[PrimitiveValue]]: [object Map]}", "[object Map]",
461                             "[[PrimitiveValue]]", "string", "[object Map]", "[object Map]", "0", "string", "[", "[",
462                             "1", "string", "o", "o", "2", "string", "b", "b", "3", "string", "j", "j", "4", "string",
463                             "e", "e", "5", "string", "c", "c", "6", "string", "t", "t", "7", "string", " ", " ", "8",
464                             "string", "M", "M", "9", "string", "a", "a", "10", "string", "p", "p", "11", "string",
465                             "]", "]", "length", "number", "12", "12" } },
466             { "string21", { "object", "Object", "String{[[PrimitiveValue]]: Cannot get source code of funtion}",
467                             "Cannot get source code of funtion", "[[PrimitiveValue]]", "string",
468                             "Cannot get source code of funtion", "Cannot get source code of funtion", "0", "string",
469                             "C", "C", "1", "string", "a", "a", "2", "string", "n", "n", "3", "string", "n", "n", "4",
470                             "string", "o", "o", "5", "string", "t", "t", "6", "string", " ", " ", "7", "string", "g",
471                             "g", "8", "string", "e", "e", "9", "string", "t", "t", "10", "string", " ", " ", "11",
472                             "string", "s", "s", "12", "string", "o", "o", "13", "string", "u", "u", "14", "string",
473                             "r", "r", "15", "string", "c", "c", "16", "string", "e", "e", "17", "string", " ", " ",
474                             "18", "string", "c", "c", "19", "string", "o", "o", "20", "string", "d", "d", "21",
475                             "string", "e", "e", "22", "string", " ", " ", "23", "string", "o", "o", "24", "string",
476                             "f", "f", "25", "string", " ", " ", "26", "string", "f", "f", "27", "string", "u", "u",
477                             "28", "string", "n", "n", "29", "string", "t", "t", "30", "string", "i", "i", "31",
478                             "string", "o", "o", "32", "string", "n", "n", "length", "number", "33", "33" } },
479             { "string22", { "string", "�", "�" } },
480             { "string23", { "string", "��", "��" } },
481             { "string24", { "string", "�", "�" } },
482             { "string25", { "string", "��‍��‍��‍��", "��‍��‍��‍��" } },
483             { "bigint1", { "bigint", "9007199254740991n", "9007199254740991" } },
484             { "bigint2", { "bigint", "9007199254740991n", "9007199254740991" } },
485             { "bigint3", { "bigint", "9007199254740991n", "9007199254740991" } },
486             { "bigint4", { "bigint", "9007199254740991n", "9007199254740991" } },
487             { "bigint5", { "bigint", "9007199254740991n", "9007199254740991" } },
488             { "bigint6", { "bigint", "9007199254740991n", "9007199254740991" } },
489             { "bigint7", { "bigint", "999n", "999" } },
490             { "bigint8", { "bigint", "9007199254741990n", "9007199254741990" } },
491             { "bigint9", { "bigint", "-9007199254739992n", "-9007199254739992" } },
492             { "bigint10", { "bigint", "8998192055486250009n", "8998192055486250009" } },
493             { "bigint11", { "bigint", "0n", "0" } },
494             { "bigint12", { "bigint", "999n", "999" } },
495             { "bigint13", { "bigint", "10000000000n", "10000000000" } },
496             { "bigint14", { "bigint", "888888888888888888888888888888888888888888888n",
497                             "888888888888888888888888888888888888888888888" } },
498             { "bigint15", { "bigint", "16383n", "16383" } },
499             { "bigint16", { "bigint", "0n", "0" } },
500             { "bigint17", { "bigint", "0n", "0" } },
501             { "bigint18", { "bigint", "122999999999999994846185700645503654167417192448n",
502                             "122999999999999994846185700645503654167417192448" } },
503             { "bigint19", { "bigint", "1234567n", "1234567" } },
504             { "bigint20", { "bigint", "65535n", "65535" } },
505             { "boolean1", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]",
506                             "boolean", "true", "true" } },
507             { "boolean2", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]",
508                             "boolean", "true", "true" } },
509             { "boolean3", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]",
510                             "boolean", "true", "true" } },
511             { "boolean4", { "object", "Object", "Boolean{[[PrimitiveValue]]: false}", "false", "[[PrimitiveValue]]",
512                             "boolean", "false", "false" } },
513             { "boolean5", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]",
514                             "boolean", "true", "true" } },
515             { "boolean6", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]",
516                             "boolean", "true", "true" } },
517             { "boolean7", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]",
518                             "boolean", "true", "true" } },
519             { "boolean8", { "object", "Object", "Boolean{[[PrimitiveValue]]: false}", "false", "[[PrimitiveValue]]",
520                             "boolean", "false", "false" } },
521             { "boolean9", { "boolean", "true", "true" } },
522             { "boolean10", { "boolean", "false", "false" } },
523             { "boolean11", { "object", "Object", "Boolean{[[PrimitiveValue]]: false}", "false", "[[PrimitiveValue]]",
524                              "boolean", "false", "false" } },
525             { "boolean12", { "boolean", "false", "false" } },
526             { "boolean13", { "object", "Object", "Boolean{[[PrimitiveValue]]: false}", "false", "[[PrimitiveValue]]",
527                              "boolean", "false", "false" } },
528             { "boolean14", { "boolean", "true", "true" } },
529             { "boolean15", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]",
530                              "boolean", "true", "true" } },
531             { "boolean16", { "object", "Object", "Boolean{[[PrimitiveValue]]: false}", "false", "[[PrimitiveValue]]",
532                              "boolean", "false", "false" } },
533             { "boolean17", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]",
534                              "boolean", "true", "true" } },
535             { "boolean18", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]",
536                              "boolean", "true", "true" } },
537             { "boolean19", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]",
538                              "boolean", "true", "true" } },
539             { "boolean20", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]",
540                              "boolean", "true", "true" } },
541             { "boolean21", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]",
542                              "boolean", "true", "true" } },
543             { "boolean22", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]",
544                              "boolean", "true", "true" } },
545             { "boolean23", { "object", "Object", "Boolean{[[PrimitiveValue]]: false}", "false", "[[PrimitiveValue]]",
546                              "boolean", "false", "false" } },
547             { "boolean24", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]",
548                              "boolean", "true", "true" } },
549             { "boolean25", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]",
550                              "boolean", "true", "true" } },
551             { "boolean26", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]",
552                              "boolean", "true", "true" } },
553             { "boolean27", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]",
554                              "boolean", "true", "true" } },
555             { "boolean28", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]",
556                              "boolean", "true", "true" } },
557             { "boolean29", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]",
558                              "boolean", "true", "true" } },
559             { "map1", { "object", "map", "Map", "Map(0)", "[object Map]", "size", "number", "0", "0", "[[Entries]]",
560                         "object", "array", "Array", "Array(0)", "" } },
561             { "map2", { "object", "map", "Map", "Map(2) {1 => 'hello', 2 => 'world'}", "[object Map]", "size",
562                         "number", "2", "2", "[[Entries]]", "object", "array", "Array", "Array(2)",
563                         "[object Object],[object Object]" } },
564             { "map3", { "object", "map", "Map", "Map(1) {NaN => 'NaN'}", "[object Map]", "size", "number", "1", "1",
565                         "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } },
566             { "map4", { "object", "map", "Map", "Map(0)", "[object Map]", "size", "number", "0", "0", "[[Entries]]",
567                         "object", "array", "Array", "Array(0)", "", "0", "string", "hello", "hello" } },
568             { "map5", { "object", "map", "Map", "Map(4) {0 => 'zero', 1 => 'one', 2 => 'two', 3 => 'three'}",
569                         "[object Map]", "size", "number", "4", "4", "[[Entries]]", "object", "array", "Array",
570                         "Array(4)", "[object Object],[object Object],[object Object],[object Object]" } },
571             { "map6", { "object", "map", "Map", "Map(1) {Object => 'set0'}", "[object Map]", "size", "number", "1",
572                         "1", "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } },
573             { "map7", { "object", "map", "Map", "Map(1) {1 => 'number0'}", "[object Map]", "size", "number", "1", "1",
574                         "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } },
575             { "map8", { "object", "map", "Map", "Map(1) {'helloworld' => 'string0'}", "[object Map]", "size",
576                         "number", "1", "1", "[[Entries]]", "object", "array", "Array", "Array(1)",
577                         "[object Object]" } },
578             { "map9", { "object", "map", "Map", "Map(1) {Object => 'object0'}", "[object Map]", "size", "number", "1",
579                         "1", "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } },
580             { "map10", { "object", "map", "Map", "Map(1) {undefined => 'undefined0'}", "[object Map]", "size",
581                          "number", "1", "1", "[[Entries]]", "object", "array", "Array", "Array(1)",
582                          "[object Object]" } },
583             { "map11", { "object", "map", "Map", "Map(1) {Object => 'array0'}", "[object Map]", "size", "number", "1",
584                          "1", "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } },
585             { "map12", { "object", "map", "Map", "Map(1) {Object => 'map3'}", "[object Map]", "size", "number", "1",
586                          "1", "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } },
587             { "map13", { "object", "map", "Map", "Map(1) {Object => 'generator0'}", "[object Map]", "size", "number",
588                          "1", "1", "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } },
589             { "map14", { "object", "map", "Map", "Map(1) {Object => 'regexp0'}", "[object Map]", "size", "number",
590                          "1", "1", "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } },
591             { "map15", { "object", "map", "Map", "Map(1) {Object => 'arraybuffer0'}", "[object Map]", "size",
592                          "number", "1", "1", "[[Entries]]", "object", "array", "Array", "Array(1)",
593                          "[object Object]" } },
594             { "map16", { "object", "map", "Map", "Map(1) {Object => 'uint8array0'}", "[object Map]", "size", "number",
595                          "1", "1", "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } },
596             { "map17", { "object", "map", "Map", "Map(1) {Object => 'dataview0'}", "[object Map]", "size", "number",
597                          "1", "1", "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } },
598             { "map18", { "object", "map", "Map", "Map(1) {8998192055486250009 => 'bigint10'}", "[object Map]", "size",
599                          "number", "1", "1", "[[Entries]]", "object", "array", "Array", "Array(1)",
600                          "[object Object]" } },
601             { "map19", { "object", "map", "Map", "Map(1) {Object => 'function0'}", "[object Map]", "size", "number",
602                          "1", "1", "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } },
603             { "object1", { "object", "Object", "Object", "[object Object]", "0", "string", "zero", "zero", "1",
604                            "string", "one", "one", "2", "string", "two", "two", "3", "string", "three", "three", "4",
605                            "string", "four", "four", "5", "string", "five", "five" } },
606             { "object2", { "object", "Object", "Object", "[object Object]", "0", "string", "zero", "zero", "1",
607                            "string", "one", "one", "2", "string", "two", "two", "3", "string", "three", "three", "4",
608                            "string", "four", "four", "5", "string", "five", "five" } },
609             { "object3", { "object", "Object", "Object", "[object Object]", "0", "string", "zero", "zero", "1",
610                            "string", "one", "one", "2", "string", "two", "two", "3", "string", "three", "three", "4",
611                            "string", "four", "four", "5", "string", "five", "five" } },
612             { "object4", { "object", "set", "Set", "Set(0)", "[object Set]", "size", "number", "0", "0",
613                            "[[Entries]]", "object", "array", "Array", "Array(0)", "" } },
614             { "object5", { "object", "Object", "String{[[PrimitiveValue]]: helloworld}", "helloworld",
615                            "[[PrimitiveValue]]", "string", "helloworld", "helloworld", "0", "string", "h", "h", "1",
616                            "string", "e", "e", "2", "string", "l", "l", "3", "string", "l", "l", "4", "string", "o",
617                            "o", "5", "string", "w", "w", "6", "string", "o", "o", "7", "string", "r", "r", "8",
618                            "string", "l", "l", "9", "string", "d", "d", "length", "number", "10", "10" } },
619             { "object6", { "object", "map", "Map", "Map(0)", "[object Map]", "size", "number", "0", "0", "[[Entries]]",
620                            "object", "array", "Array", "Array(0)", "" } },
621             { "object7", { "object", "Object", "Number{[[PrimitiveValue]]: 1}", "1", "[[PrimitiveValue]]", "number",
622                            "1", "1" } },
623             { "object8", { "object", "Object", "Object", "[object Object]", "key0", "string", "value0", "value0",
624                            "key1", "number", "100", "100" } },
625             { "object9", { "object", "Object", "Object", "[object Object]", "none" } },
626             { "object10", { "object", "array", "Array", "Array(2)", "Apple,Banana", "0", "string", "Apple", "Apple",
627                             "1", "string", "Banana", "Banana", "length", "number", "2", "2" } },
628             { "object11", { "object", "Object", "Object", "8998192055486250009", "none" } },
629             { "object12", { "function", "Generator", "function* generator0( { [js code] }",
630                             "Cannot get source code of funtion" } },
631             { "object13", { "object", "regexp", "RegExp", "/^\\d+\\.\\d+$/i", "/^\\d+\\.\\d+$/i", "global", "boolean",
632                             "false", "false", "ignoreCase", "boolean", "true", "true", "multiline", "boolean", "false",
633                             "false", "dotAll", "boolean", "false", "false", "hasIndices", "boolean", "false", "false",
634                             "unicode", "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags",
635                             "string", "i", "i", "source", "string", "^\\d+\\.\\d+$", "^\\d+\\.\\d+$", "lastIndex",
636                             "number", "0", "0" } },
637             { "object14", { "object", "Object", "Object", "999", "none" } },
638             { "object15", { "object", "arraybuffer", "Arraybuffer", "ArrayBuffer(24)", "[object ArrayBuffer]",
639                             "[[Int8Array]]", "object", "Object", "Int8Array(24)",
640                             "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0", "[[Uint8Array]]", "object", "Object",
641                             "Uint8Array(24)", "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0",
642                             "[[Uint8ClampedArray]]", "object", "Object", "Object",
643                             "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0", "[[Int16Array]]", "object", "Object",
644                             "Int16Array(12)", "0,0,0,0,0,0,0,0,0,0,0,0", "[[Uint16Array]]", "object", "Object",
645                             "Object", "0,0,0,0,0,0,0,0,0,0,0,0", "[[Int32Array]]", "object", "Object",
646                             "Int32Array(6)", "0,0,0,0,0,0", "[[Uint32Array]]", "object", "Object", "Object",
647                             "0,0,0,0,0,0", "[[Float32Array]]", "object", "Object", "Object", "0,0,0,0,0,0",
648                             "[[Float64Array]]", "object", "Object", "Object", "0,0,0", "[[BigInt64Array]]", "object",
649                             "Object", "Object", "0,0,0", "[[BigUint64Array]]",
650                             "object", "Object", "Object", "0,0,0" } },
651             { "object16", { "object", "Object", "Uint8Array(24)", "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0",
652                             "0", "number", "0", "0", "1", "number", "0", "0", "2", "number", "0", "0", "3", "number",
653                             "0", "0", "4", "number", "0", "0", "5", "number", "0", "0", "6", "number", "0", "0", "7",
654                             "number", "0", "0", "8", "number", "0", "0", "9", "number", "0", "0", "10", "number", "0",
655                             "0", "11", "number", "0", "0", "12", "number", "0", "0", "13", "number", "0", "0", "14",
656                             "number", "0", "0", "15", "number", "0", "0", "16", "number", "0", "0", "17", "number",
657                             "0", "0", "18", "number", "0", "0", "19", "number", "0", "0", "20", "number", "0", "0",
658                             "21", "number", "0", "0", "22", "number", "0", "0", "23", "number", "0", "0" } },
659             { "object17", { "object", "dataview", "Dataview", "DataView(24)", "[object DataView]", "buffer",
660                             "object", "arraybuffer", "Arraybuffer", "ArrayBuffer(24)", "[object ArrayBuffer]",
661                             "byteLength", "number", "24", "24", "byteOffset", "number", "0", "0" } },
662             { "object18", { "object", "Object", "Boolean{[[PrimitiveValue]]: false}", "false", "[[PrimitiveValue]]",
663                             "boolean", "false", "false" } },
664             { "object19", { "function", "Function", "function function0( { [js code] }",
665                             "Cannot get source code of funtion" } },
666             { "regExp1", { "object", "regexp", "RegExp", "/^a/g", "/^a/g", "global", "boolean", "true", "true",
667                            "ignoreCase", "boolean", "false", "false", "multiline", "boolean", "false", "false",
668                            "dotAll", "boolean", "false", "false", "hasIndices", "boolean", "false", "false", "unicode",
669                            "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags", "string", "g",
670                            "g", "source", "string", "^a", "^a", "lastIndex", "number", "0", "0" } },
671             { "regExp2", { "object", "regexp", "RegExp", "/^ab+c/g", "/^ab+c/g", "global", "boolean", "true", "true",
672                            "ignoreCase", "boolean", "false", "false", "multiline", "boolean", "false", "false",
673                            "dotAll", "boolean", "false", "false", "hasIndices", "boolean", "false", "false", "unicode",
674                            "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags", "string", "g",
675                            "g", "source", "string", "^ab+c", "^ab+c", "lastIndex", "number", "0", "0" } },
676             { "regExp3", { "object", "regexp", "RegExp", "/123$/", "/123$/", "global", "boolean", "false", "false",
677                            "ignoreCase", "boolean", "false", "false", "multiline", "boolean", "false", "false",
678                            "dotAll", "boolean", "false", "false", "hasIndices", "boolean", "false", "false", "unicode",
679                            "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags", "string", "",
680                            "", "source", "string", "123$", "123$", "lastIndex", "number", "0", "0" } },
681             { "regExp4", { "object", "regexp", "RegExp", "/\\d/i", "/\\d/i", "global", "boolean", "false", "false",
682                            "ignoreCase", "boolean", "true", "true", "multiline", "boolean", "false", "false", "dotAll",
683                            "boolean", "false", "false", "hasIndices", "boolean", "false", "false", "unicode",
684                            "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags", "string", "i",
685                            "i", "source", "string", "\\d", "\\d", "lastIndex", "number", "0", "0" } },
686             { "regExp5", { "object", "regexp", "RegExp", "/^[a-zA-Z]/w{5,17}$/iu", "/^[a-zA-Z]\\/w{5,17}$/iu",
687                            "global", "boolean", "false", "false", "ignoreCase", "boolean", "true", "true", "multiline",
688                            "boolean", "false", "false", "dotAll", "boolean", "false", "false", "hasIndices", "boolean",
689                            "false", "false", "unicode", "boolean", "true", "true", "sticky", "boolean", "false",
690                            "false", "flags", "string", "iu", "iu", "source", "string",
691                            "^[a-zA-Z]/w{5,17}$", "^[a-zA-Z]/w{5,17}$", "lastIndex", "number", "0", "0" } },
692             { "regExp6", { "object", "regexp", "RegExp", "/[A-Z]/m", "/[A-Z]/m", "global", "boolean", "false", "false",
693                            "ignoreCase", "boolean", "false", "false", "multiline", "boolean", "true", "true", "dotAll",
694                            "boolean", "false", "false", "hasIndices", "boolean", "false", "false", "unicode",
695                            "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags", "string", "m",
696                            "m", "source", "string", "[A-Z]", "[A-Z]", "lastIndex", "number", "0", "0" } },
697             { "regExp7", { "object", "regexp", "RegExp", "/(/d{3}-|/d{4}-)?(/d{8}|/d{7})?/gm",
698                            "/(\\/d{3}-|\\/d{4}-)?(\\/d{8}|\\/d{7})?/gm", "global", "boolean", "true", "true",
699                            "ignoreCase", "boolean", "false", "false", "multiline", "boolean", "true", "true", "dotAll",
700                            "boolean", "false", "false", "hasIndices", "boolean", "false", "false", "unicode",
701                            "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags", "string", "gm",
702                            "gm", "source", "string", "(/d{3}-|/d{4}-)?(/d{8}|/d{7})?",
703                            "(/d{3}-|/d{4}-)?(/d{8}|/d{7})?", "lastIndex", "number", "0", "0" } },
704             { "regExp8", { "object", "regexp", "RegExp", "/[a-z]/y", "/[a-z]/y", "global", "boolean", "false", "false",
705                            "ignoreCase", "boolean", "false", "false", "multiline", "boolean", "false", "false",
706                            "dotAll", "boolean", "false", "false", "hasIndices", "boolean", "false", "false", "unicode",
707                            "boolean", "false", "false", "sticky", "boolean", "true", "true", "flags", "string", "y",
708                            "y", "source", "string", "[a-z]", "[a-z]", "lastIndex", "number", "0", "0" } },
709             { "regExp9", { "object", "regexp", "RegExp", "/\\s/u", "/\\s/u", "global", "boolean", "false", "false",
710                            "ignoreCase", "boolean", "false", "false", "multiline", "boolean", "false", "false",
711                            "dotAll", "boolean", "false", "false", "hasIndices", "boolean", "false", "false",
712                            "unicode", "boolean", "true", "true", "sticky", "boolean", "false", "false", "flags",
713                            "string", "u", "u", "source", "string", "\\s", "\\s", "lastIndex", "number", "0", "0" } },
714             { "regExp10", { "object", "regexp", "RegExp", "/a+/s", "/a+/s", "global", "boolean", "false", "false",
715                             "ignoreCase", "boolean", "false", "false", "multiline", "boolean", "false", "false",
716                             "dotAll", "boolean", "true", "true", "hasIndices", "boolean", "true", "true", "unicode",
717                             "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags", "string",
718                             "s", "s", "source", "string", "a+", "a+", "lastIndex", "number", "0", "0" } },
719             { "regExp11", { "object", "regexp", "RegExp", "/(d+-)?(d{4}-?d{7}|d{3}-?d{8}|^d{7,8})(-d+)?/s",
720                             "/(d+-)?(d{4}-?d{7}|d{3}-?d{8}|^d{7,8})(-d+)?/s", "global", "boolean", "false", "false",
721                             "ignoreCase", "boolean", "false", "false", "multiline", "boolean", "false", "false",
722                             "dotAll", "boolean", "true", "true", "hasIndices", "boolean", "true", "true", "unicode",
723                             "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags", "string",
724                             "s", "s", "source", "string", "(d+-)?(d{4}-?d{7}|d{3}-?d{8}|^d{7,8})(-d+)?",
725                             "(d+-)?(d{4}-?d{7}|d{3}-?d{8}|^d{7,8})(-d+)?", "lastIndex", "number", "0", "0" } },
726             { "regExp12", { "object", "regexp", "RegExp", "/a?/gy", "/a?/gy", "global", "boolean", "true", "true",
727                             "ignoreCase", "boolean", "false", "false", "multiline", "boolean", "false", "false",
728                             "dotAll", "boolean", "false", "false", "hasIndices", "boolean", "false", "false",
729                             "unicode", "boolean", "false", "false", "sticky", "boolean", "true", "true", "flags",
730                             "string", "gy", "gy", "source", "string", "a?", "a?", "lastIndex", "number", "0", "0" } },
731             { "regExp13", { "object", "regexp", "RegExp",
732                             "//^((0([1-9]{1}))|(1[1|2]))/(([0-2]([1-9]{1}))|(3[0|1]))/(d{2}|d{4})$//",
733                             "/\\/^((0([1-9]{1}))|(1[1|2]))\\/(([0-2]([1-9]{1}))|(3[0|1]))\\/(d{2}|d{4})$\\//",
734                             "global", "boolean", "false", "false", "ignoreCase", "boolean", "false", "false",
735                             "multiline", "boolean", "false", "false", "dotAll", "boolean", "false", "false",
736                             "hasIndices", "boolean", "false", "false", "unicode", "boolean", "false", "false",
737                             "sticky", "boolean", "false", "false", "flags", "string", "", "", "source", "string",
738                             "/^((0([1-9]{1}))|(1[1|2]))/(([0-2]([1-9]{1}))|(3[0|1]))/(d{2}|d{4})$/",
739                             "/^((0([1-9]{1}))|(1[1|2]))/(([0-2]([1-9]{1}))|(3[0|1]))/(d{2}|d{4})$/", "lastIndex",
740                             "number", "0", "0" } },
741             { "regExp14", { "object", "regexp", "RegExp", "/a*/gimy", "/a*/gimy", "global", "boolean", "true", "true",
742                             "ignoreCase", "boolean", "true", "true", "multiline", "boolean", "true", "true", "dotAll",
743                             "boolean", "false", "false", "hasIndices", "boolean", "false", "false", "unicode",
744                             "boolean", "false", "false", "sticky", "boolean", "true", "true", "flags", "string",
745                             "gimy", "gimy", "source", "string", "a*", "a*", "lastIndex", "number", "0", "0" } },
746             { "regExp15", { "object", "regexp", "RegExp", "/^[/w-]+(/.[/w-]+)*@[/w-]+(/.[/w-]+)+$/gi",
747                             "/^[\\/w-]+(\\/.[\\/w-]+)*@[\\/w-]+(\\/.[\\/w-]+)+$/gi", "global", "boolean", "true",
748                             "true", "ignoreCase", "boolean", "true", "true", "multiline", "boolean", "false",
749                             "false", "dotAll", "boolean", "false", "false", "hasIndices", "boolean", "false", "false",
750                             "unicode", "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags",
751                             "string", "gi", "gi", "source", "string", "^[/w-]+(/.[/w-]+)*@[/w-]+(/.[/w-]+)+$",
752                             "^[/w-]+(/.[/w-]+)*@[/w-]+(/.[/w-]+)+$", "lastIndex", "number", "0", "0" } },
753             { "regExp16", { "object", "regexp", "RegExp", "/a|b/gimsy", "/a|b/gimsy", "global", "boolean", "true",
754                             "true", "ignoreCase", "boolean", "true", "true", "multiline", "boolean", "true", "true",
755                             "dotAll", "boolean", "true", "true", "hasIndices", "boolean", "true", "true", "unicode",
756                             "boolean", "false", "false", "sticky", "boolean", "true", "true", "flags", "string",
757                             "gimsy", "gimsy", "source", "string", "a|b", "a|b", "lastIndex", "number", "0", "0" } },
758             { "regExp17", { "object", "regexp", "RegExp",
759                             "/^((0([1-9]{1}))|(1[1|2]))/(([0-2]([1-9]{1}))|(3[0|1]))/(d{2}|d{4})$/",
760                             "/^((0([1-9]{1}))|(1[1|2]))\\/(([0-2]([1-9]{1}))|(3[0|1]))\\/(d{2}|d{4})$/", "global",
761                             "boolean", "false", "false", "ignoreCase", "boolean", "false", "false", "multiline",
762                             "boolean", "false", "false", "dotAll", "boolean", "false", "false", "hasIndices",
763                             "boolean", "false", "false", "unicode", "boolean", "false", "false", "sticky", "boolean",
764                             "false", "false", "flags", "string", "", "", "source", "string",
765                             "^((0([1-9]{1}))|(1[1|2]))/(([0-2]([1-9]{1}))|(3[0|1]))/(d{2}|d{4})$",
766                             "^((0([1-9]{1}))|(1[1|2]))/(([0-2]([1-9]{1}))|(3[0|1]))/(d{2}|d{4})$", "lastIndex",
767                             "number", "0", "0" } },
768             { "regExp18", { "object", "regexp", "RegExp", "/\\/<(.*)>.*<\\/\\/\\/1>|<(.*) \\/\\/>/i",
769                             "/\\\\/<(.*)>.*<\\\\/\\\\/\\\\/1>|<(.*) \\\\/\\\\/>/i", "global", "boolean", "false",
770                             "false", "ignoreCase", "boolean", "true", "true", "multiline", "boolean", "false",
771                             "false", "dotAll", "boolean", "false", "false", "hasIndices", "boolean", "false", "false",
772                             "unicode", "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags",
773                             "string", "i", "i", "source", "string",
774                             "\\/<(.*)>.*<\\/\\/\\/1>|<(.*) \\/\\/>", "\\/<(.*)>.*<\\/\\/\\/1>|<(.*) \\/\\/>",
775                             "lastIndex", "number", "0", "0" } },
776             { "regExp19", { "object", "regexp", "RegExp", "/^[1-9]*[1-9][0-9]*$/m", "/^[1-9]*[1-9][0-9]*$/m",
777                             "global", "boolean", "false", "false", "ignoreCase", "boolean", "false", "false",
778                             "multiline", "boolean", "true", "true", "dotAll", "boolean", "false", "false",
779                             "hasIndices", "boolean", "false", "false", "unicode", "boolean", "false", "false",
780                             "sticky", "boolean", "false", "false", "flags", "string", "m", "m", "source",
781                             "string", "^[1-9]*[1-9][0-9]*$", "^[1-9]*[1-9][0-9]*$", "lastIndex", "number",
782                             "0", "0" } },
783             { "regExp20", { "object", "regexp", "RegExp", "/^[a-zA-Z]\\/w{5,17}$/", "/^[a-zA-Z]\\\\/w{5,17}$/",
784                             "global", "boolean", "false", "false", "ignoreCase", "boolean", "false", "false",
785                             "multiline", "boolean", "false", "false", "dotAll", "boolean", "false", "false",
786                             "hasIndices", "boolean", "false", "false", "unicode", "boolean", "false", "false",
787                             "sticky", "boolean", "false", "false", "flags", "string", "", "", "source", "string",
788                             "^[a-zA-Z]\\/w{5,17}$", "^[a-zA-Z]\\/w{5,17}$", "lastIndex", "number", "0", "0" } },
789             { "regExp21", { "object", "regexp", "RegExp", "/^[0-9a-zA-Z_]{1,}$/u", "/^[0-9a-zA-Z_]{1,}$/u", "global",
790                             "boolean", "false", "false", "ignoreCase", "boolean", "false", "false", "multiline",
791                             "boolean", "false", "false", "dotAll", "boolean", "false", "false", "hasIndices",
792                             "boolean", "false", "false", "unicode", "boolean", "true", "true", "sticky", "boolean",
793                             "false", "false", "flags", "string", "u", "u", "source", "string", "^[0-9a-zA-Z_]{1,}$",
794                             "^[0-9a-zA-Z_]{1,}$", "lastIndex", "number", "0", "0" } },
795             { "proxy", { "object", "proxy", "Object", "Proxy", "[object Object]",
796                          "[[Target]]", "object", "Object", "Object", "[object Object]",
797                          "[[Handler]]", "object", "Object", "Object", "[object Object]",
798                          "[[IsRevoked]]", "boolean", "false", "false" } },
799             { "proxy1", { "object", "proxy", "Object", "Proxy", "[object Object]",
800                           "[[Target]]", "object", "Object", "Object", "[object Object]",
801                           "[[Handler]]", "object", "Object", "Object", "[object Object]",
802                           "[[IsRevoked]]", "boolean", "false", "false" } },
803             { "proxy2", { "object", "Object", "Object", "[object Object]",
804                           "proxy", "object", "proxy", "Object", "Proxy", "[object Object]",
805                           "revoke", "function", "Function", "function ( { [native code] }",
806                           "function () { [native code] }" } },
807             { "revoke", { "function", "Function", "function ( { [native code] }", "function () { [native code] }" } },
808             { "target", { "object", "Object", "Object", "[object Object]",
809                           "name", "string", "openharmony", "openharmony",
810                           "age", "number", "3", "3" } },
811             { "handler", { "object", "Object", "Object", "[object Object]",
812                            "get", "function", "Function", "function get( { [js code] }",
813                            "Cannot get source code of funtion",
814                            "set", "function", "Function", "function set( { [js code] }",
815                            "Cannot get source code of funtion" } },
816             { "resolveHandler", { "function", "Function", "function resolveHandler( { [js code] }",
817                                   "Cannot get source code of funtion"} },
818             { "result", { "object", "Object", "Object", "[object Object]", "flag", "boolean",
819                           "true", "true"} },
820             { "a", { "object", "promise", "Promise", "Promise", "[object Promise]",
821                      "[[PromiseState]]", "string", "Fulfilled", "Fulfilled", "[[PromiseResult]]",
822                      "object", "Object", "Object", "[object Object]"} },
823         };
824 
825         int32_t index_ {0};
826         const EcmaVM *vm_ {nullptr};
827         RuntimeImpl *runtime_ {nullptr};
828     };
829 
830     std::string entryPoint_ = "_GLOBAL::func_main_0";
831     JSPtLocation location_ {nullptr, JSPtLocation::EntityId(0), 0};
832     size_t breakpointCounter_ = 0;
833 };
834 
GetJsVariableFirstTest()835 std::unique_ptr<TestEvents> GetJsVariableFirstTest()
836 {
837     return std::make_unique<JsVariableFirstTest>();
838 }
839 }  // namespace panda::ecmascript::tooling::test
840 
841 #endif  // ECMASCRIPT_TOOLING_TEST_UTILS_TESTCASES_JS_VARIABLE_TEST_H
842