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 21namespace panda::ecmascript::tooling::test { 22class JsVariableFirstTest : public TestEvents { 23public: 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 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 } 77 ~JsVariableFirstTest() 78 { 79 delete channel_; 80 channel_ = nullptr; 81 } 82 83private: 84 class JsVariableFirstTestChannel : public TestChannel { 85 public: 86 JsVariableFirstTestChannel() = default; 87 ~JsVariableFirstTestChannel() = default; 88 void Initial(const EcmaVM *vm, RuntimeImpl *runtime) 89 { 90 vm_ = vm; 91 runtime_ = runtime; 92 } 93 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 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(vm_) << std::endl; 189 std::cout << "tostring: " << 190 value->GetValue()->ToString(vm_)->ToString(vm_) << std::endl; 191 infos.push_back(value->GetValue()->ToString(vm_)->ToString(vm_)); 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", "Uint8ClampedArray", 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", "Uint16Array", "0,0,0,0,0,0,0,0,0,0,0,0", 231 "[[Int32Array]]", "object", "Object", 232 "Int32Array(6)", "0,0,0,0,0,0", "[[Uint32Array]]", "object", "Object", "Uint32Array", 233 "0,0,0,0,0,0", "[[Float32Array]]", "object", "Object", "Float32Array", "0,0,0,0,0,0", 234 "[[Float64Array]]", "object", "Object", "Float64Array", "0,0,0", "[[BigInt64Array]]", 235 "object", "Object", "BigInt64Array", "0,0,0", "[[BigUint64Array]]", "object", "Object", 236 "BigUint64Array", "0,0,0" } }, 237 { "function0", { "function", "Function", "function function0( { [js code] }", 238 "Cannot get source code of funtion" } }, 239 { "generator0", { "function", "Generator", "function* generator0( { [js code] }", 240 "Cannot get source code of funtion" } }, 241 { "map0", { "object", "map", "Map", "Map(0)", "[object Map]", "size", "number", "0", "0", "[[Entries]]", 242 "object", "array", "Array", "Array(0)", "" } }, 243 { "set0", { "object", "set", "Set", "Set(0)", "[object Set]", "size", "number", "0", "0", "[[Entries]]", 244 "object", "array", "Array", "Array(0)", "" } }, 245 { "undefined0", { "undefined" } }, 246 { "array0", { "object", "array", "Array", "Array(2)", "Apple,Banana", "0", "string", "Apple", "Apple", 247 "1", "string", "Banana", "Banana", "length", "number", "2", "2" } }, 248 { "regexp0", { "object", "regexp", "RegExp", "/^\\d+\\.\\d+$/i", "/^\\d+\\.\\d+$/i", "global", "boolean", 249 "false", "false", "ignoreCase", "boolean", "true", "true", "multiline", "boolean", "false", 250 "false", "dotAll", "boolean", "false", "false", "hasIndices", "boolean", "false", "false", 251 "unicode", "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags", 252 "string", "i", "i", "source", "string", "^\\d+\\.\\d+$", "^\\d+\\.\\d+$", "lastIndex", 253 "number", "0", "0" } }, 254 { "uint8array0", { "object", "Object", "Uint8Array(24)", 255 "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", 256 "1", "number", "0", "0", "2", "number", "0", "0", "3", "number", "0", "0", "4", 257 "number", "0", "0", "5", "number", "0", "0", "6", "number", "0", "0", "7", 258 "number", "0", "0", "8", "number", "0", "0", "9", "number", "0", "0", "10", 259 "number", "0", "0", "11", "number", "0", "0", "12", "number", "0", "0", "13", 260 "number", "0", "0", "14", "number", "0", "0", "15", "number", "0", "0", "16", 261 "number", "0", "0", "17", "number", "0", "0", "18", "number", "0", "0", "19", 262 "number", "0", "0", "20", "number", "0", "0", "21", "number", "0", "0", "22", 263 "number", "0", "0", "23", "number", "0", "0" } }, 264 { "dataview0", { "object", "dataview", "Dataview", "DataView(24)", "[object DataView]", "buffer", 265 "object", "arraybuffer", "Arraybuffer", "Arraybuffer(24)", "[object ArrayBuffer]", 266 "byteLength", "number", "24", "24", "byteOffset", "number", "0", "0" } }, 267 { "bigint0", { "bigint", "999n", "999" } }, 268 { "typedarray0", { "object", "Object", "Uint8Array(0)", "", "none" } }, 269 { "sharedarraybuffer0", { "object", "Object", "SharedArrayBuffer(32)", "[object SharedArrayBuffer]", 270 "[[Int8Array]]", "object", "Object", "Int8Array(32)", 271 "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", 272 "[[Uint8Array]]", "object", "Object", "Uint8Array(32)", 273 "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", 274 "[[Int16Array]]", "object", "Object", "Int16Array(16)", 275 "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0", "[[Int32Array]]", "object", "Object", 276 "Int32Array(8)", "0,0,0,0,0,0,0,0", "[[ArrayBufferByteLength]]", "number", "32", 277 "32", "byteLength", "number", "32", "32" } }, 278 { "weakref0", { "object", "Object", "WeakRef {}", "[object WeakRef]", "none" } }, 279 { "iterator0", { "function", "Function", "function [Symbol.iterator]( { [native code] }", 280 "function [Symbol.iterator]() { [native code] }" } }, 281 { "set1", { "object", "set", "Set", "Set(1) {1}", "[object Set]", "size", "number", "1", "1", 282 "[[Entries]]", "object", "array", "Array", "Array(1)", "1" } }, 283 { "set2", { "object", "set", "Set", "Set(7) {'h', 'e', 'l', 'o', 'w', ...}", "[object Set]", "size", 284 "number", "7", "7", "[[Entries]]", "object", "array", "Array", "Array(7)", 285 "h,e,l,o,w,r,d" } }, 286 { "set3", { "object", "set", "Set", "Set(1) {Object}", "[object Set]", "size", "number", "1", "1", 287 "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } }, 288 { "set4", { "object", "set", "Set", "Set(0)", "[object Set]", "size", "number", "0", "0", "[[Entries]]", 289 "object", "array", "Array", "Array(0)", "" } }, 290 { "set5", { "object", "set", "Set", "Set(2) {'Apple', 'Banana'}", "[object Set]", "size", "number", "2", 291 "2", "[[Entries]]", "object", "array", "Array", "Array(2)", "Apple,Banana" } }, 292 { "set6", { "object", "set", "Set", "Set(0)", "[object Set]", "size", "number", "0", "0", "[[Entries]]", 293 "object", "array", "Array", "Array(0)", "" } }, 294 { "set7", { "object", "set", "Set", "Set(0)", "[object Set]", "size", "number", "0", "0", "[[Entries]]", 295 "object", "array", "Array", "Array(0)", "" } }, 296 { "set8", { "object", "set", "Set", "Set(1) {Object}", "[object Set]", "size", "number", "1", "1", 297 "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } }, 298 { "set9", { "object", "set", "Set", "Set(1) {Object}", "[object Set]", "size", "number", "1", "1", 299 "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } }, 300 { "set10", { "object", "set", "Set", "Set(1) {Object}", "[object Set]", "size", "number", "1", "1", 301 "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } }, 302 { "set11", { "object", "set", "Set", "Set(1) {Object}", "[object Set]", "size", "number", "1", "1", 303 "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } }, 304 { "set12", { "object", "set", "Set", "Set(1) {Object}", "[object Set]", "size", "number", "1", "1", 305 "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } }, 306 { "set13", { "object", "set", "Set", "Set(1) {Object}", "[object Set]", "size", "number", "1", "1", 307 "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } }, 308 { "set14", { "object", "set", "Set", "Set(0)", "[object Set]", "size", "number", "0", "0", "[[Entries]]", 309 "object", "array", "Array", "Array(0)", "" } }, 310 { "set15", { "object", "set", "Set", "Set(4) {0, 'hello', Object, 1}", "[object Set]", "size", 311 "number", "4", "4", "[[Entries]]", "object", "array", "Array", "Array(4)", 312 "0,hello,[object Object],1" } }, 313 { "set16", { "object", "set", "Set", "Set(1) {Object}", "[object Set]", "size", "number", "1", "1", 314 "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } }, 315 { "set17", { "object", "set", "Set", "Set(1) {999}", "[object Set]", "size", "number", "1", "1", 316 "[[Entries]]", "object", "array", "Array", "Array(1)", "999" } }, 317 { "set18", { "object", "set", "Set", "Set(1) {Object}", "[object Set]", "size", "number", "1", "1", 318 "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } }, 319 { "set19", { "object", "set", "Set", "Set(0)", "[object Set]", "size", "number", "0", "0", 320 "[[Entries]]", "object", "array", "Array", "Array(0)", "" } }, 321 { "number1", { "number", "65535", "65535" } }, 322 { "number2", { "number", "5e-324", "5e-324" } }, 323 { "number3", { "number", "10000000000", "10000000000" } }, 324 { "number4", { "number", "2199023255551", "2199023255551" } }, 325 { "number5", { "number", "16383", "16383" } }, 326 { "number6", { "object", "Object", "Number{[[PrimitiveValue]]: 999}", "999", "[[PrimitiveValue]]", 327 "number", "999", "999" } }, 328 { "number7", { "number", "1.23e+47", "1.23e+47" } }, 329 { "number8", { "number", "1", "1" } }, 330 { "number9", { "number", "65536", "65536" } }, 331 { "number10", { "number", "-65534", "-65534" } }, 332 { "number11", { "number", "65535", "65535" } }, 333 { "number12", { "number", "0.000015259021896696422", "0.000015259021896696422" } }, 334 { "number13", { "number", "1", "1" } }, 335 { "number14", { "object", "Object", "Number{[[PrimitiveValue]]: 0}", "0", "[[PrimitiveValue]]", "number", 336 "0", "0" } }, 337 { "number15", { "object", "Object", "Number{[[PrimitiveValue]]: 1.7976931348623157e+308}", 338 "1.7976931348623157e+308", "[[PrimitiveValue]]", "number", "1.7976931348623157e+308", 339 "1.7976931348623157e+308" } }, 340 { "number16", { "object", "Object", "Number{[[PrimitiveValue]]: 5e-324}", "5e-324", "[[PrimitiveValue]]", 341 "number", "5e-324", "5e-324" } }, 342 { "number17", { "object", "Object", "Number{[[PrimitiveValue]]: 10000000000}", "10000000000", 343 "[[PrimitiveValue]]", "number", "10000000000", "10000000000" } }, 344 { "number18", { "object", "Object", "Number{[[PrimitiveValue]]: 2199023255551}", "2199023255551", 345 "[[PrimitiveValue]]", "number", "2199023255551", "2199023255551" } }, 346 { "number19", { "object", "Object", "Number{[[PrimitiveValue]]: 16383}", "16383", "[[PrimitiveValue]]", 347 "number", "16383", "16383" } }, 348 { "number20", { "object", "Object", "Number{[[PrimitiveValue]]: 1.23e+47}", "1.23e+47", 349 "[[PrimitiveValue]]", "number", "1.23e+47", "1.23e+47" } }, 350 { "number21", { "object", "Object", "Number{[[PrimitiveValue]]: 1}", "1", "[[PrimitiveValue]]", "number", 351 "1", "1" } }, 352 { "number22", { "object", "Object", "Number{[[PrimitiveValue]]: 65536}", "65536", "[[PrimitiveValue]]", 353 "number", "65536", "65536" } }, 354 { "number23", { "object", "Object", "Number{[[PrimitiveValue]]: -65534}", "-65534", "[[PrimitiveValue]]", 355 "number", "-65534", "-65534" } }, 356 { "number24", { "object", "Object", "Number{[[PrimitiveValue]]: 65535}", "65535", "[[PrimitiveValue]]", 357 "number", "65535", "65535" } }, 358 { "number25", { "object", "Object", "Number{[[PrimitiveValue]]: 0.000015259021896696422}", 359 "0.000015259021896696422", "[[PrimitiveValue]]", "number", "0.000015259021896696422", 360 "0.000015259021896696422" } }, 361 { "number26", { "object", "Object", "Number{[[PrimitiveValue]]: 1}", "1", "[[PrimitiveValue]]", "number", 362 "1", "1" } }, 363 { "number27", { "number", "1.7976931348623157e+308", "1.7976931348623157e+308" } }, 364 { "string1", { "string", "", "" } }, 365 { "string2", { "string", "", "" } }, 366 { "string3", { "string", "world", "world" } }, 367 { "string4", { "string", "helloworld", "helloworld" } }, 368 { "string5", { "string", "e", "e" } }, 369 { "string6", { "string", "1", "1" } }, 370 { "string7", { "object", "Object", "String{[[PrimitiveValue]]: }", "", "[[PrimitiveValue]]", "string", "", 371 "", "length", "number", "0", "0" } }, 372 { "string8", { "object", "Object", "String{[[PrimitiveValue]]: [object Set]}", "[object Set]", 373 "[[PrimitiveValue]]", "string", "[object Set]", "[object Set]", "0", "string", "[", "[", 374 "1", "string", "o", "o", "2", "string", "b", "b", "3", "string", "j", "j", "4", "string", 375 "e", "e", "5", "string", "c", "c", "6", "string", "t", "t", "7", "string", " ", " ", "8", 376 "string", "S", "S", "9", "string", "e", "e", "10", "string", "t", "t", "11", "string", "]", 377 "]", "length", "number", "12", "12" } }, 378 { "string9", { "object", "Object", "String{[[PrimitiveValue]]: 1}", "1", "[[PrimitiveValue]]", "string", 379 "1", "1", "0", "string", "1", "1", "length", "number", "1", "1" } }, 380 { "string10", { "object", "Object", "String{[[PrimitiveValue]]: helloworld}", "helloworld", 381 "[[PrimitiveValue]]", "string", "helloworld", "helloworld", "0", "string", "h", "h", "1", 382 "string", "e", "e", "2", "string", "l", "l", "3", "string", "l", "l", "4", "string", "o", 383 "o", "5", "string", "w", "w", "6", "string", "o", "o", "7", "string", "r", "r", "8", 384 "string", "l", "l", "9", "string", "d", "d", "length", "number", "10", "10" } }, 385 { "string11", { "object", "Object", "String{[[PrimitiveValue]]: [object Object]}", "[object Object]", 386 "[[PrimitiveValue]]", "string", "[object Object]", "[object Object]", "0", "string", "[", 387 "[", "1", "string", "o", "o", "2", "string", "b", "b", "3", "string", "j", "j", "4", 388 "string", "e", "e", "5", "string", "c", "c", "6", "string", "t", "t", "7", "string", " ", 389 " ", "8", "string", "O", "O", "9", "string", "b", "b", "10", "string", "j", "j", "11", 390 "string", "e", "e", "12", "string", "c", "c", "13", "string", "t", "t", "14", "string", 391 "]", "]", "length", "number", "15", "15" } }, 392 { "string12", { "object", "Object", "String{[[PrimitiveValue]]: undefined}", "undefined", 393 "[[PrimitiveValue]]", "string", "undefined", "undefined", "0", "string", "u", "u", "1", 394 "string", "n", "n", "2", "string", "d", "d", "3", "string", "e", "e", "4", "string", "f", 395 "f", "5", "string", "i", "i", "6", "string", "n", "n", "7", "string", "e", "e", "8", 396 "string", "d", "d", "length", "number", "9", "9" } }, 397 { "string13", { "object", "Object", "String{[[PrimitiveValue]]: Apple,Banana}", "Apple,Banana", 398 "[[PrimitiveValue]]", "string", "Apple,Banana", "Apple,Banana", "0", "string", "A", "A", 399 "1", "string", "p", "p", "2", "string", "p", "p", "3", "string", "l", "l", "4", "string", 400 "e", "e", "5", "string", ",", ",", "6", "string", "B", "B", "7", "string", "a", "a", "8", 401 "string", "n", "n", "9", "string", "a", "a", "10", "string", "n", "n", "11", "string", 402 "a", "a", "length", "number", "12", "12" } }, 403 { "string14", { "object", "Object", "String{[[PrimitiveValue]]: 999}", "999", "[[PrimitiveValue]]", 404 "string", "999", "999", "0", "string", "9", "9", "1", "string", "9", "9", "2", "string", 405 "9", "9", "length", "number", "3", "3" } }, 406 { "string15", { "object", "Object", "String{[[PrimitiveValue]]: Cannot get source code of funtion}", 407 "Cannot get source code of funtion", "[[PrimitiveValue]]", "string", 408 "Cannot get source code of funtion", "Cannot get source code of funtion", "0", "string", 409 "C", "C", "1", "string", "a", "a", "2", "string", "n", "n", "3", "string", "n", "n", "4", 410 "string", "o", "o", "5", "string", "t", "t", "6", "string", " ", " ", "7", "string", "g", 411 "g", "8", "string", "e", "e", "9", "string", "t", "t", "10", "string", " ", " ", "11", 412 "string", "s", "s", "12", "string", "o", "o", "13", "string", "u", "u", "14", "string", 413 "r", "r", "15", "string", "c", "c", "16", "string", "e", "e", "17", "string", " ", " ", 414 "18", "string", "c", "c", "19", "string", "o", "o", "20", "string", "d", "d", "21", 415 "string", "e", "e", "22", "string", " ", " ", "23", "string", "o", "o", "24", "string", 416 "f", "f", "25", "string", " ", " ", "26", "string", "f", "f", "27", "string", "u", "u", 417 "28", "string", "n", "n", "29", "string", "t", "t", "30", "string", "i", "i", "31", 418 "string", "o", "o", "32", "string", "n", "n", "length", "number", "33", "33" } }, 419 { "string16", { "object", "Object", "String{[[PrimitiveValue]]: /^\\d+\\.\\d+$/i}", "/^\\d+\\.\\d+$/i", 420 "[[PrimitiveValue]]", "string", "/^\\d+\\.\\d+$/i", "/^\\d+\\.\\d+$/i", "0", "string", "/", 421 "/", "1", "string", "^", "^", "2", "string", "\\", "\\", "3", "string", "d", "d", "4", 422 "string", "+", "+", "5", "string", "\\", "\\", "6", "string", ".", ".", "7", "string", 423 "\\", "\\", "8", "string", "d", "d", "9", "string", "+", "+", "10", "string", "$", "$", 424 "11", "string", "/", "/", "12", "string", "i", "i", "length", "number", "13", "13"} }, 425 { "string17", { "object", "Object", "String{[[PrimitiveValue]]: [object ArrayBuffer]}", 426 "[object ArrayBuffer]", "[[PrimitiveValue]]", "string", "[object ArrayBuffer]", 427 "[object ArrayBuffer]", "0", "string", "[", "[", "1", "string", "o", "o", "2", "string", 428 "b", "b", "3", "string", "j", "j", "4", "string", "e", "e", "5", "string", "c", "c", "6", 429 "string", "t", "t", "7", "string", " ", " ", "8", "string", "A", "A", "9", "string", "r", 430 "r", "10", "string", "r", "r", "11", "string", "a", "a", "12", "string", "y", "y", "13", 431 "string", "B", "B", "14", "string", "u", "u", "15", "string", "f", "f", "16", "string", 432 "f", "f", "17", "string", "e", "e", "18", "string", "r", "r", "19", "string", "]", "]", 433 "length", "number", "20", "20" } }, 434 { "string18", { "object", "Object", 435 "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}", 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", "[[PrimitiveValue]]", "string", 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", 438 "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", 439 "string", ",", ",", "2", "string", "0", "0", "3", "string", ",", ",", "4", "string", "0", 440 "0", "5", "string", ",", ",", "6", "string", "0", "0", "7", "string", ",", ",", "8", 441 "string", "0", "0", "9", "string", ",", ",", "10", "string", "0", "0", "11", "string", 442 ",", ",", "12", "string", "0", "0", "13", "string", ",", ",", "14", "string", "0", "0", 443 "15", "string", ",", ",", "16", "string", "0", "0", "17", "string", ",", ",", "18", 444 "string", "0", "0", "19", "string", ",", ",", "20", "string", "0", "0", "21", "string", 445 ",", ",", "22", "string", "0", "0", "23", "string", ",", ",", "24", "string", "0", "0", 446 "25", "string", ",", ",", "26", "string", "0", "0", "27", "string", ",", ",", "28", 447 "string", "0", "0", "29", "string", ",", ",", "30", "string", "0", "0", "31", "string", 448 ",", ",", "32", "string", "0", "0", "33", "string", ",", ",", "34", "string", "0", "0", 449 "35", "string", ",", ",", "36", "string", "0", "0", "37", "string", ",", ",", "38", 450 "string", "0", "0", "39", "string", ",", ",", "40", "string", "0", "0", "41", "string", 451 ",", ",", "42", "string", "0", "0", "43", "string", ",", ",", "44", "string", "0", "0", 452 "45", "string", ",", ",", "46", "string", "0", "0", "length", "number", "47", "47" } }, 453 { "string19", { "object", "Object", "String{[[PrimitiveValue]]: [object DataView]}", "[object DataView]", 454 "[[PrimitiveValue]]", "string", "[object DataView]", "[object DataView]", 455 "0", "string", "[", "[", "1", "string", "o", "o", "2", "string", "b", "b", "3", "string", 456 "j", "j", "4", "string", "e", "e", "5", "string", "c", "c", "6", "string", "t", "t", "7", 457 "string", " ", " ", "8", "string", "D", "D", "9", "string", "a", "a", "10", "string", "t", 458 "t", "11", "string", "a", "a", "12", "string", "V", "V", "13", "string", "i", "i", "14", 459 "string", "e", "e", "15", "string", "w", "w", "16", "string", "]", "]", "length", "number", 460 "17", "17" } }, 461 { "string20", { "object", "Object", "String{[[PrimitiveValue]]: [object Map]}", "[object Map]", 462 "[[PrimitiveValue]]", "string", "[object Map]", "[object Map]", "0", "string", "[", "[", 463 "1", "string", "o", "o", "2", "string", "b", "b", "3", "string", "j", "j", "4", "string", 464 "e", "e", "5", "string", "c", "c", "6", "string", "t", "t", "7", "string", " ", " ", "8", 465 "string", "M", "M", "9", "string", "a", "a", "10", "string", "p", "p", "11", "string", 466 "]", "]", "length", "number", "12", "12" } }, 467 { "string21", { "object", "Object", "String{[[PrimitiveValue]]: Cannot get source code of funtion}", 468 "Cannot get source code of funtion", "[[PrimitiveValue]]", "string", 469 "Cannot get source code of funtion", "Cannot get source code of funtion", "0", "string", 470 "C", "C", "1", "string", "a", "a", "2", "string", "n", "n", "3", "string", "n", "n", "4", 471 "string", "o", "o", "5", "string", "t", "t", "6", "string", " ", " ", "7", "string", "g", 472 "g", "8", "string", "e", "e", "9", "string", "t", "t", "10", "string", " ", " ", "11", 473 "string", "s", "s", "12", "string", "o", "o", "13", "string", "u", "u", "14", "string", 474 "r", "r", "15", "string", "c", "c", "16", "string", "e", "e", "17", "string", " ", " ", 475 "18", "string", "c", "c", "19", "string", "o", "o", "20", "string", "d", "d", "21", 476 "string", "e", "e", "22", "string", " ", " ", "23", "string", "o", "o", "24", "string", 477 "f", "f", "25", "string", " ", " ", "26", "string", "f", "f", "27", "string", "u", "u", 478 "28", "string", "n", "n", "29", "string", "t", "t", "30", "string", "i", "i", "31", 479 "string", "o", "o", "32", "string", "n", "n", "length", "number", "33", "33" } }, 480 { "string22", { "string", "�", "�" } }, 481 { "string23", { "string", "", "" } }, 482 { "string24", { "string", "�", "�" } }, 483 { "string25", { "string", "", "" } }, 484 { "bigint1", { "bigint", "9007199254740991n", "9007199254740991" } }, 485 { "bigint2", { "bigint", "9007199254740991n", "9007199254740991" } }, 486 { "bigint3", { "bigint", "9007199254740991n", "9007199254740991" } }, 487 { "bigint4", { "bigint", "9007199254740991n", "9007199254740991" } }, 488 { "bigint5", { "bigint", "9007199254740991n", "9007199254740991" } }, 489 { "bigint6", { "bigint", "9007199254740991n", "9007199254740991" } }, 490 { "bigint7", { "bigint", "999n", "999" } }, 491 { "bigint8", { "bigint", "9007199254741990n", "9007199254741990" } }, 492 { "bigint9", { "bigint", "-9007199254739992n", "-9007199254739992" } }, 493 { "bigint10", { "bigint", "8998192055486250009n", "8998192055486250009" } }, 494 { "bigint11", { "bigint", "0n", "0" } }, 495 { "bigint12", { "bigint", "999n", "999" } }, 496 { "bigint13", { "bigint", "10000000000n", "10000000000" } }, 497 { "bigint14", { "bigint", "888888888888888888888888888888888888888888888n", 498 "888888888888888888888888888888888888888888888" } }, 499 { "bigint15", { "bigint", "16383n", "16383" } }, 500 { "bigint16", { "bigint", "0n", "0" } }, 501 { "bigint17", { "bigint", "0n", "0" } }, 502 { "bigint18", { "bigint", "122999999999999994846185700645503654167417192448n", 503 "122999999999999994846185700645503654167417192448" } }, 504 { "bigint19", { "bigint", "1234567n", "1234567" } }, 505 { "bigint20", { "bigint", "65535n", "65535" } }, 506 { "boolean1", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]", 507 "boolean", "true", "true" } }, 508 { "boolean2", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]", 509 "boolean", "true", "true" } }, 510 { "boolean3", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]", 511 "boolean", "true", "true" } }, 512 { "boolean4", { "object", "Object", "Boolean{[[PrimitiveValue]]: false}", "false", "[[PrimitiveValue]]", 513 "boolean", "false", "false" } }, 514 { "boolean5", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]", 515 "boolean", "true", "true" } }, 516 { "boolean6", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]", 517 "boolean", "true", "true" } }, 518 { "boolean7", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]", 519 "boolean", "true", "true" } }, 520 { "boolean8", { "object", "Object", "Boolean{[[PrimitiveValue]]: false}", "false", "[[PrimitiveValue]]", 521 "boolean", "false", "false" } }, 522 { "boolean9", { "boolean", "true", "true" } }, 523 { "boolean10", { "boolean", "false", "false" } }, 524 { "boolean11", { "object", "Object", "Boolean{[[PrimitiveValue]]: false}", "false", "[[PrimitiveValue]]", 525 "boolean", "false", "false" } }, 526 { "boolean12", { "boolean", "false", "false" } }, 527 { "boolean13", { "object", "Object", "Boolean{[[PrimitiveValue]]: false}", "false", "[[PrimitiveValue]]", 528 "boolean", "false", "false" } }, 529 { "boolean14", { "boolean", "true", "true" } }, 530 { "boolean15", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]", 531 "boolean", "true", "true" } }, 532 { "boolean16", { "object", "Object", "Boolean{[[PrimitiveValue]]: false}", "false", "[[PrimitiveValue]]", 533 "boolean", "false", "false" } }, 534 { "boolean17", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]", 535 "boolean", "true", "true" } }, 536 { "boolean18", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]", 537 "boolean", "true", "true" } }, 538 { "boolean19", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]", 539 "boolean", "true", "true" } }, 540 { "boolean20", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]", 541 "boolean", "true", "true" } }, 542 { "boolean21", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]", 543 "boolean", "true", "true" } }, 544 { "boolean22", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]", 545 "boolean", "true", "true" } }, 546 { "boolean23", { "object", "Object", "Boolean{[[PrimitiveValue]]: false}", "false", "[[PrimitiveValue]]", 547 "boolean", "false", "false" } }, 548 { "boolean24", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]", 549 "boolean", "true", "true" } }, 550 { "boolean25", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]", 551 "boolean", "true", "true" } }, 552 { "boolean26", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]", 553 "boolean", "true", "true" } }, 554 { "boolean27", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]", 555 "boolean", "true", "true" } }, 556 { "boolean28", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]", 557 "boolean", "true", "true" } }, 558 { "boolean29", { "object", "Object", "Boolean{[[PrimitiveValue]]: true}", "true", "[[PrimitiveValue]]", 559 "boolean", "true", "true" } }, 560 { "map1", { "object", "map", "Map", "Map(0)", "[object Map]", "size", "number", "0", "0", "[[Entries]]", 561 "object", "array", "Array", "Array(0)", "" } }, 562 { "map2", { "object", "map", "Map", "Map(2) {1 => 'hello', 2 => 'world'}", "[object Map]", "size", 563 "number", "2", "2", "[[Entries]]", "object", "array", "Array", "Array(2)", 564 "[object Object],[object Object]" } }, 565 { "map3", { "object", "map", "Map", "Map(1) {NaN => 'NaN'}", "[object Map]", "size", "number", "1", "1", 566 "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } }, 567 { "map4", { "object", "map", "Map", "Map(0)", "[object Map]", "size", "number", "0", "0", "[[Entries]]", 568 "object", "array", "Array", "Array(0)", "", "0", "string", "hello", "hello" } }, 569 { "map5", { "object", "map", "Map", "Map(4) {0 => 'zero', 1 => 'one', 2 => 'two', 3 => 'three'}", 570 "[object Map]", "size", "number", "4", "4", "[[Entries]]", "object", "array", "Array", 571 "Array(4)", "[object Object],[object Object],[object Object],[object Object]" } }, 572 { "map6", { "object", "map", "Map", "Map(1) {Object => 'set0'}", "[object Map]", "size", "number", "1", 573 "1", "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } }, 574 { "map7", { "object", "map", "Map", "Map(1) {1 => 'number0'}", "[object Map]", "size", "number", "1", "1", 575 "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } }, 576 { "map8", { "object", "map", "Map", "Map(1) {'helloworld' => 'string0'}", "[object Map]", "size", 577 "number", "1", "1", "[[Entries]]", "object", "array", "Array", "Array(1)", 578 "[object Object]" } }, 579 { "map9", { "object", "map", "Map", "Map(1) {Object => 'object0'}", "[object Map]", "size", "number", "1", 580 "1", "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } }, 581 { "map10", { "object", "map", "Map", "Map(1) {undefined => 'undefined0'}", "[object Map]", "size", 582 "number", "1", "1", "[[Entries]]", "object", "array", "Array", "Array(1)", 583 "[object Object]" } }, 584 { "map11", { "object", "map", "Map", "Map(1) {Object => 'array0'}", "[object Map]", "size", "number", "1", 585 "1", "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } }, 586 { "map12", { "object", "map", "Map", "Map(1) {Object => 'map3'}", "[object Map]", "size", "number", "1", 587 "1", "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } }, 588 { "map13", { "object", "map", "Map", "Map(1) {Object => 'generator0'}", "[object Map]", "size", "number", 589 "1", "1", "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } }, 590 { "map14", { "object", "map", "Map", "Map(1) {Object => 'regexp0'}", "[object Map]", "size", "number", 591 "1", "1", "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } }, 592 { "map15", { "object", "map", "Map", "Map(1) {Object => 'arraybuffer0'}", "[object Map]", "size", 593 "number", "1", "1", "[[Entries]]", "object", "array", "Array", "Array(1)", 594 "[object Object]" } }, 595 { "map16", { "object", "map", "Map", "Map(1) {Object => 'uint8array0'}", "[object Map]", "size", "number", 596 "1", "1", "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } }, 597 { "map17", { "object", "map", "Map", "Map(1) {Object => 'dataview0'}", "[object Map]", "size", "number", 598 "1", "1", "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } }, 599 { "map18", { "object", "map", "Map", "Map(1) {8998192055486250009 => 'bigint10'}", "[object Map]", "size", 600 "number", "1", "1", "[[Entries]]", "object", "array", "Array", "Array(1)", 601 "[object Object]" } }, 602 { "map19", { "object", "map", "Map", "Map(1) {Object => 'function0'}", "[object Map]", "size", "number", 603 "1", "1", "[[Entries]]", "object", "array", "Array", "Array(1)", "[object Object]" } }, 604 { "object1", { "object", "Object", "Object", "[object Object]", "0", "string", "zero", "zero", "1", 605 "string", "one", "one", "2", "string", "two", "two", "3", "string", "three", "three", "4", 606 "string", "four", "four", "5", "string", "five", "five" } }, 607 { "object2", { "object", "Object", "Object", "[object Object]", "0", "string", "zero", "zero", "1", 608 "string", "one", "one", "2", "string", "two", "two", "3", "string", "three", "three", "4", 609 "string", "four", "four", "5", "string", "five", "five" } }, 610 { "object3", { "object", "Object", "Object", "[object Object]", "0", "string", "zero", "zero", "1", 611 "string", "one", "one", "2", "string", "two", "two", "3", "string", "three", "three", "4", 612 "string", "four", "four", "5", "string", "five", "five" } }, 613 { "object4", { "object", "set", "Set", "Set(0)", "[object Set]", "size", "number", "0", "0", 614 "[[Entries]]", "object", "array", "Array", "Array(0)", "" } }, 615 { "object5", { "object", "Object", "String{[[PrimitiveValue]]: helloworld}", "helloworld", 616 "[[PrimitiveValue]]", "string", "helloworld", "helloworld", "0", "string", "h", "h", "1", 617 "string", "e", "e", "2", "string", "l", "l", "3", "string", "l", "l", "4", "string", "o", 618 "o", "5", "string", "w", "w", "6", "string", "o", "o", "7", "string", "r", "r", "8", 619 "string", "l", "l", "9", "string", "d", "d", "length", "number", "10", "10" } }, 620 { "object6", { "object", "map", "Map", "Map(0)", "[object Map]", "size", "number", "0", "0", "[[Entries]]", 621 "object", "array", "Array", "Array(0)", "" } }, 622 { "object7", { "object", "Object", "Number{[[PrimitiveValue]]: 1}", "1", "[[PrimitiveValue]]", "number", 623 "1", "1" } }, 624 { "object8", { "object", "Object", "Object", "[object Object]", "key0", "string", "value0", "value0", 625 "key1", "number", "100", "100" } }, 626 { "object9", { "object", "Object", "Object", "[object Object]", "none" } }, 627 { "object10", { "object", "array", "Array", "Array(2)", "Apple,Banana", "0", "string", "Apple", "Apple", 628 "1", "string", "Banana", "Banana", "length", "number", "2", "2" } }, 629 { "object11", { "object", "Object", "BigInt", "8998192055486250009", "none" } }, 630 { "object12", { "function", "Generator", "function* generator0( { [js code] }", 631 "Cannot get source code of funtion" } }, 632 { "object13", { "object", "regexp", "RegExp", "/^\\d+\\.\\d+$/i", "/^\\d+\\.\\d+$/i", "global", "boolean", 633 "false", "false", "ignoreCase", "boolean", "true", "true", "multiline", "boolean", "false", 634 "false", "dotAll", "boolean", "false", "false", "hasIndices", "boolean", "false", "false", 635 "unicode", "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags", 636 "string", "i", "i", "source", "string", "^\\d+\\.\\d+$", "^\\d+\\.\\d+$", "lastIndex", 637 "number", "0", "0" } }, 638 { "object14", { "object", "Object", "BigInt", "999", "none" } }, 639 { "object15", { "object", "arraybuffer", "Arraybuffer", "Arraybuffer(24)", "[object ArrayBuffer]", 640 "[[Int8Array]]", "object", "Object", "Int8Array(24)", 641 "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", 642 "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", 643 "[[Uint8ClampedArray]]", "object", "Object", "Uint8ClampedArray", 644 "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", 645 "Int16Array(12)", "0,0,0,0,0,0,0,0,0,0,0,0", "[[Uint16Array]]", "object", "Object", 646 "Uint16Array", "0,0,0,0,0,0,0,0,0,0,0,0", "[[Int32Array]]", "object", "Object", 647 "Int32Array(6)", "0,0,0,0,0,0", "[[Uint32Array]]", "object", "Object", "Uint32Array", 648 "0,0,0,0,0,0", "[[Float32Array]]", "object", "Object", "Float32Array", "0,0,0,0,0,0", 649 "[[Float64Array]]", "object", "Object", 650 "Float64Array", "0,0,0", "[[BigInt64Array]]", "object", 651 "Object", "BigInt64Array", "0,0,0", "[[BigUint64Array]]", 652 "object", "Object", "BigUint64Array", "0,0,0" } }, 653 { "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", 654 "0", "number", "0", "0", "1", "number", "0", "0", "2", "number", "0", "0", "3", "number", 655 "0", "0", "4", "number", "0", "0", "5", "number", "0", "0", "6", "number", "0", "0", "7", 656 "number", "0", "0", "8", "number", "0", "0", "9", "number", "0", "0", "10", "number", "0", 657 "0", "11", "number", "0", "0", "12", "number", "0", "0", "13", "number", "0", "0", "14", 658 "number", "0", "0", "15", "number", "0", "0", "16", "number", "0", "0", "17", "number", 659 "0", "0", "18", "number", "0", "0", "19", "number", "0", "0", "20", "number", "0", "0", 660 "21", "number", "0", "0", "22", "number", "0", "0", "23", "number", "0", "0" } }, 661 { "object17", { "object", "dataview", "Dataview", "DataView(24)", "[object DataView]", "buffer", 662 "object", "arraybuffer", "Arraybuffer", "Arraybuffer(24)", "[object ArrayBuffer]", 663 "byteLength", "number", "24", "24", "byteOffset", "number", "0", "0" } }, 664 { "object18", { "object", "Object", "Boolean{[[PrimitiveValue]]: false}", "false", "[[PrimitiveValue]]", 665 "boolean", "false", "false" } }, 666 { "object19", { "function", "Function", "function function0( { [js code] }", 667 "Cannot get source code of funtion" } }, 668 { "regExp1", { "object", "regexp", "RegExp", "/^a/g", "/^a/g", "global", "boolean", "true", "true", 669 "ignoreCase", "boolean", "false", "false", "multiline", "boolean", "false", "false", 670 "dotAll", "boolean", "false", "false", "hasIndices", "boolean", "false", "false", "unicode", 671 "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags", "string", "g", 672 "g", "source", "string", "^a", "^a", "lastIndex", "number", "0", "0" } }, 673 { "regExp2", { "object", "regexp", "RegExp", "/^ab+c/g", "/^ab+c/g", "global", "boolean", "true", "true", 674 "ignoreCase", "boolean", "false", "false", "multiline", "boolean", "false", "false", 675 "dotAll", "boolean", "false", "false", "hasIndices", "boolean", "false", "false", "unicode", 676 "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags", "string", "g", 677 "g", "source", "string", "^ab+c", "^ab+c", "lastIndex", "number", "0", "0" } }, 678 { "regExp3", { "object", "regexp", "RegExp", "/123$/", "/123$/", "global", "boolean", "false", "false", 679 "ignoreCase", "boolean", "false", "false", "multiline", "boolean", "false", "false", 680 "dotAll", "boolean", "false", "false", "hasIndices", "boolean", "false", "false", "unicode", 681 "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags", "string", "", 682 "", "source", "string", "123$", "123$", "lastIndex", "number", "0", "0" } }, 683 { "regExp4", { "object", "regexp", "RegExp", "/\\d/i", "/\\d/i", "global", "boolean", "false", "false", 684 "ignoreCase", "boolean", "true", "true", "multiline", "boolean", "false", "false", "dotAll", 685 "boolean", "false", "false", "hasIndices", "boolean", "false", "false", "unicode", 686 "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags", "string", "i", 687 "i", "source", "string", "\\d", "\\d", "lastIndex", "number", "0", "0" } }, 688 { "regExp5", { "object", "regexp", "RegExp", "/^[a-zA-Z]/w{5,17}$/iu", "/^[a-zA-Z]\\/w{5,17}$/iu", 689 "global", "boolean", "false", "false", "ignoreCase", "boolean", "true", "true", "multiline", 690 "boolean", "false", "false", "dotAll", "boolean", "false", "false", "hasIndices", "boolean", 691 "false", "false", "unicode", "boolean", "true", "true", "sticky", "boolean", "false", 692 "false", "flags", "string", "iu", "iu", "source", "string", 693 "^[a-zA-Z]/w{5,17}$", "^[a-zA-Z]/w{5,17}$", "lastIndex", "number", "0", "0" } }, 694 { "regExp6", { "object", "regexp", "RegExp", "/[A-Z]/m", "/[A-Z]/m", "global", "boolean", "false", "false", 695 "ignoreCase", "boolean", "false", "false", "multiline", "boolean", "true", "true", "dotAll", 696 "boolean", "false", "false", "hasIndices", "boolean", "false", "false", "unicode", 697 "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags", "string", "m", 698 "m", "source", "string", "[A-Z]", "[A-Z]", "lastIndex", "number", "0", "0" } }, 699 { "regExp7", { "object", "regexp", "RegExp", "/(/d{3}-|/d{4}-)?(/d{8}|/d{7})?/gm", 700 "/(\\/d{3}-|\\/d{4}-)?(\\/d{8}|\\/d{7})?/gm", "global", "boolean", "true", "true", 701 "ignoreCase", "boolean", "false", "false", "multiline", "boolean", "true", "true", "dotAll", 702 "boolean", "false", "false", "hasIndices", "boolean", "false", "false", "unicode", 703 "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags", "string", "gm", 704 "gm", "source", "string", "(/d{3}-|/d{4}-)?(/d{8}|/d{7})?", 705 "(/d{3}-|/d{4}-)?(/d{8}|/d{7})?", "lastIndex", "number", "0", "0" } }, 706 { "regExp8", { "object", "regexp", "RegExp", "/[a-z]/y", "/[a-z]/y", "global", "boolean", "false", "false", 707 "ignoreCase", "boolean", "false", "false", "multiline", "boolean", "false", "false", 708 "dotAll", "boolean", "false", "false", "hasIndices", "boolean", "false", "false", "unicode", 709 "boolean", "false", "false", "sticky", "boolean", "true", "true", "flags", "string", "y", 710 "y", "source", "string", "[a-z]", "[a-z]", "lastIndex", "number", "0", "0" } }, 711 { "regExp9", { "object", "regexp", "RegExp", "/\\s/u", "/\\s/u", "global", "boolean", "false", "false", 712 "ignoreCase", "boolean", "false", "false", "multiline", "boolean", "false", "false", 713 "dotAll", "boolean", "false", "false", "hasIndices", "boolean", "false", "false", 714 "unicode", "boolean", "true", "true", "sticky", "boolean", "false", "false", "flags", 715 "string", "u", "u", "source", "string", "\\s", "\\s", "lastIndex", "number", "0", "0" } }, 716 { "regExp10", { "object", "regexp", "RegExp", "/a+/s", "/a+/s", "global", "boolean", "false", "false", 717 "ignoreCase", "boolean", "false", "false", "multiline", "boolean", "false", "false", 718 "dotAll", "boolean", "true", "true", "hasIndices", "boolean", "true", "true", "unicode", 719 "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags", "string", 720 "s", "s", "source", "string", "a+", "a+", "lastIndex", "number", "0", "0" } }, 721 { "regExp11", { "object", "regexp", "RegExp", "/(d+-)?(d{4}-?d{7}|d{3}-?d{8}|^d{7,8})(-d+)?/s", 722 "/(d+-)?(d{4}-?d{7}|d{3}-?d{8}|^d{7,8})(-d+)?/s", "global", "boolean", "false", "false", 723 "ignoreCase", "boolean", "false", "false", "multiline", "boolean", "false", "false", 724 "dotAll", "boolean", "true", "true", "hasIndices", "boolean", "true", "true", "unicode", 725 "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags", "string", 726 "s", "s", "source", "string", "(d+-)?(d{4}-?d{7}|d{3}-?d{8}|^d{7,8})(-d+)?", 727 "(d+-)?(d{4}-?d{7}|d{3}-?d{8}|^d{7,8})(-d+)?", "lastIndex", "number", "0", "0" } }, 728 { "regExp12", { "object", "regexp", "RegExp", "/a?/gy", "/a?/gy", "global", "boolean", "true", "true", 729 "ignoreCase", "boolean", "false", "false", "multiline", "boolean", "false", "false", 730 "dotAll", "boolean", "false", "false", "hasIndices", "boolean", "false", "false", 731 "unicode", "boolean", "false", "false", "sticky", "boolean", "true", "true", "flags", 732 "string", "gy", "gy", "source", "string", "a?", "a?", "lastIndex", "number", "0", "0" } }, 733 { "regExp13", { "object", "regexp", "RegExp", 734 "//^((0([1-9]{1}))|(1[1|2]))/(([0-2]([1-9]{1}))|(3[0|1]))/(d{2}|d{4})$//", 735 "/\\/^((0([1-9]{1}))|(1[1|2]))\\/(([0-2]([1-9]{1}))|(3[0|1]))\\/(d{2}|d{4})$\\//", 736 "global", "boolean", "false", "false", "ignoreCase", "boolean", "false", "false", 737 "multiline", "boolean", "false", "false", "dotAll", "boolean", "false", "false", 738 "hasIndices", "boolean", "false", "false", "unicode", "boolean", "false", "false", 739 "sticky", "boolean", "false", "false", "flags", "string", "", "", "source", "string", 740 "/^((0([1-9]{1}))|(1[1|2]))/(([0-2]([1-9]{1}))|(3[0|1]))/(d{2}|d{4})$/", 741 "/^((0([1-9]{1}))|(1[1|2]))/(([0-2]([1-9]{1}))|(3[0|1]))/(d{2}|d{4})$/", "lastIndex", 742 "number", "0", "0" } }, 743 { "regExp14", { "object", "regexp", "RegExp", "/a*/gimy", "/a*/gimy", "global", "boolean", "true", "true", 744 "ignoreCase", "boolean", "true", "true", "multiline", "boolean", "true", "true", "dotAll", 745 "boolean", "false", "false", "hasIndices", "boolean", "false", "false", "unicode", 746 "boolean", "false", "false", "sticky", "boolean", "true", "true", "flags", "string", 747 "gimy", "gimy", "source", "string", "a*", "a*", "lastIndex", "number", "0", "0" } }, 748 { "regExp15", { "object", "regexp", "RegExp", "/^[/w-]+(/.[/w-]+)*@[/w-]+(/.[/w-]+)+$/gi", 749 "/^[\\/w-]+(\\/.[\\/w-]+)*@[\\/w-]+(\\/.[\\/w-]+)+$/gi", "global", "boolean", "true", 750 "true", "ignoreCase", "boolean", "true", "true", "multiline", "boolean", "false", 751 "false", "dotAll", "boolean", "false", "false", "hasIndices", "boolean", "false", "false", 752 "unicode", "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags", 753 "string", "gi", "gi", "source", "string", "^[/w-]+(/.[/w-]+)*@[/w-]+(/.[/w-]+)+$", 754 "^[/w-]+(/.[/w-]+)*@[/w-]+(/.[/w-]+)+$", "lastIndex", "number", "0", "0" } }, 755 { "regExp16", { "object", "regexp", "RegExp", "/a|b/gimsy", "/a|b/gimsy", "global", "boolean", "true", 756 "true", "ignoreCase", "boolean", "true", "true", "multiline", "boolean", "true", "true", 757 "dotAll", "boolean", "true", "true", "hasIndices", "boolean", "true", "true", "unicode", 758 "boolean", "false", "false", "sticky", "boolean", "true", "true", "flags", "string", 759 "gimsy", "gimsy", "source", "string", "a|b", "a|b", "lastIndex", "number", "0", "0" } }, 760 { "regExp17", { "object", "regexp", "RegExp", 761 "/^((0([1-9]{1}))|(1[1|2]))/(([0-2]([1-9]{1}))|(3[0|1]))/(d{2}|d{4})$/", 762 "/^((0([1-9]{1}))|(1[1|2]))\\/(([0-2]([1-9]{1}))|(3[0|1]))\\/(d{2}|d{4})$/", "global", 763 "boolean", "false", "false", "ignoreCase", "boolean", "false", "false", "multiline", 764 "boolean", "false", "false", "dotAll", "boolean", "false", "false", "hasIndices", 765 "boolean", "false", "false", "unicode", "boolean", "false", "false", "sticky", "boolean", 766 "false", "false", "flags", "string", "", "", "source", "string", 767 "^((0([1-9]{1}))|(1[1|2]))/(([0-2]([1-9]{1}))|(3[0|1]))/(d{2}|d{4})$", 768 "^((0([1-9]{1}))|(1[1|2]))/(([0-2]([1-9]{1}))|(3[0|1]))/(d{2}|d{4})$", "lastIndex", 769 "number", "0", "0" } }, 770 { "regExp18", { "object", "regexp", "RegExp", "/\\/<(.*)>.*<\\/\\/\\/1>|<(.*) \\/\\/>/i", 771 "/\\\\/<(.*)>.*<\\\\/\\\\/\\\\/1>|<(.*) \\\\/\\\\/>/i", "global", "boolean", "false", 772 "false", "ignoreCase", "boolean", "true", "true", "multiline", "boolean", "false", 773 "false", "dotAll", "boolean", "false", "false", "hasIndices", "boolean", "false", "false", 774 "unicode", "boolean", "false", "false", "sticky", "boolean", "false", "false", "flags", 775 "string", "i", "i", "source", "string", 776 "\\/<(.*)>.*<\\/\\/\\/1>|<(.*) \\/\\/>", "\\/<(.*)>.*<\\/\\/\\/1>|<(.*) \\/\\/>", 777 "lastIndex", "number", "0", "0" } }, 778 { "regExp19", { "object", "regexp", "RegExp", "/^[1-9]*[1-9][0-9]*$/m", "/^[1-9]*[1-9][0-9]*$/m", 779 "global", "boolean", "false", "false", "ignoreCase", "boolean", "false", "false", 780 "multiline", "boolean", "true", "true", "dotAll", "boolean", "false", "false", 781 "hasIndices", "boolean", "false", "false", "unicode", "boolean", "false", "false", 782 "sticky", "boolean", "false", "false", "flags", "string", "m", "m", "source", 783 "string", "^[1-9]*[1-9][0-9]*$", "^[1-9]*[1-9][0-9]*$", "lastIndex", "number", 784 "0", "0" } }, 785 { "regExp20", { "object", "regexp", "RegExp", "/^[a-zA-Z]\\/w{5,17}$/", "/^[a-zA-Z]\\\\/w{5,17}$/", 786 "global", "boolean", "false", "false", "ignoreCase", "boolean", "false", "false", 787 "multiline", "boolean", "false", "false", "dotAll", "boolean", "false", "false", 788 "hasIndices", "boolean", "false", "false", "unicode", "boolean", "false", "false", 789 "sticky", "boolean", "false", "false", "flags", "string", "", "", "source", "string", 790 "^[a-zA-Z]\\/w{5,17}$", "^[a-zA-Z]\\/w{5,17}$", "lastIndex", "number", "0", "0" } }, 791 { "regExp21", { "object", "regexp", "RegExp", "/^[0-9a-zA-Z_]{1,}$/u", "/^[0-9a-zA-Z_]{1,}$/u", "global", 792 "boolean", "false", "false", "ignoreCase", "boolean", "false", "false", "multiline", 793 "boolean", "false", "false", "dotAll", "boolean", "false", "false", "hasIndices", 794 "boolean", "false", "false", "unicode", "boolean", "true", "true", "sticky", "boolean", 795 "false", "false", "flags", "string", "u", "u", "source", "string", "^[0-9a-zA-Z_]{1,}$", 796 "^[0-9a-zA-Z_]{1,}$", "lastIndex", "number", "0", "0" } }, 797 { "proxy", { "object", "proxy", "Object", "Proxy", "[object Object]", 798 "[[Target]]", "object", "Object", "Object", "[object Object]", 799 "[[Handler]]", "object", "Object", "Object", "[object Object]", 800 "[[IsRevoked]]", "boolean", "false", "false" } }, 801 { "proxy1", { "object", "proxy", "Object", "Proxy", "[object Object]", 802 "[[Target]]", "object", "Object", "Object", "[object Object]", 803 "[[Handler]]", "object", "Object", "Object", "[object Object]", 804 "[[IsRevoked]]", "boolean", "false", "false" } }, 805 { "proxy2", { "object", "Object", "Object", "[object Object]", 806 "proxy", "object", "proxy", "Object", "Proxy", "[object Object]", 807 "revoke", "function", "Function", "function ( { [native code] }", 808 "function () { [native code] }" } }, 809 { "revoke", { "function", "Function", "function ( { [native code] }", "function () { [native code] }" } }, 810 { "target", { "object", "Object", "Object", "[object Object]", 811 "name", "string", "openharmony", "openharmony", 812 "age", "number", "3", "3" } }, 813 { "handler", { "object", "Object", "Object", "[object Object]", 814 "get", "function", "Function", "function get( { [js code] }", 815 "Cannot get source code of funtion", 816 "set", "function", "Function", "function set( { [js code] }", 817 "Cannot get source code of funtion" } }, 818 { "resolveHandler", { "function", "Function", "function resolveHandler( { [js code] }", 819 "Cannot get source code of funtion"} }, 820 { "result", { "object", "Object", "Object", "[object Object]", "flag", "boolean", 821 "true", "true"} }, 822 { "a", { "object", "promise", "Promise", "Promise", "[object Promise]", 823 "[[PromiseState]]", "string", "Fulfilled", "Fulfilled", "[[PromiseResult]]", 824 "object", "Object", "Object", "[object Object]"} }, 825 }; 826 827 int32_t index_ {0}; 828 const EcmaVM *vm_ {nullptr}; 829 RuntimeImpl *runtime_ {nullptr}; 830 }; 831 832 std::string entryPoint_ = "_GLOBAL::func_main_0"; 833 JSPtLocation location_ {nullptr, JSPtLocation::EntityId(0), 0}; 834 size_t breakpointCounter_ = 0; 835}; 836 837std::unique_ptr<TestEvents> GetJsVariableFirstTest() 838{ 839 return std::make_unique<JsVariableFirstTest>(); 840} 841} // namespace panda::ecmascript::tooling::test 842 843#endif // ECMASCRIPT_TOOLING_TEST_UTILS_TESTCASES_JS_VARIABLE_TEST_H 844