Lines Matching defs:Array

18  * @tc.desc:test Array
22 var arr = new Array(100);
30 var arr2 = new Array(100);
74 // Test on Array::Splice
75 var arr9 = new Array(9);
83 var arr10 = new Array(9);
91 var arr11 = new Array(9);
99 var arr12 = new Array(9);
107 var arr13 = new Array(9);
115 var arr14 = Array.apply(null, Array(16));
117 var arr15 = Array.apply(null, [1, 2, 3, 4, 5, 6]);
121 print(Array(5).indexOf(a));
130 const v20 = new Array(2);
165 const arrs = new Array(6);
195 print("======== Begin: Array.prototype.reverse() ========");
217 print("======== End: Array.prototype.reverse() ========");
219 print("======== Begin: Array.prototype.indexOf() & Array.prototype.lastIndexOf() ========");
340 for (let method of [Array.prototype.indexOf, Array.prototype.lastIndexOf]) {
354 print("======== End: Array.prototype.indexOf() & Array.prototype.lastIndexOf() ========");
356 // Test Array.prototype.filter when callbackFn is not callable
373 print(Array.prototype.concat.apply(obj))
392 class MyObserveArrray extends Array {
438 arr = new Array(1026);
442 arr = new Array(1026);
446 arr = new Array(1026);
478 let objects = [Object, Error, AggregateError, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, URIError, String, BigInt, Function, Number, Boolean, Date, RegExp, Array, ArrayBuffer, DataView, Int8Array, Int16Array, Int32Array, Uint8Array, Uint8ClampedArray, Uint16Array, Uint32Array, Float32Array, Float64Array, BigInt64Array, BigUint64Array, Set, Map, WeakMap, WeakSet, Symbol, Proxy];
489 Array.prototype.length = 3000;
490 print(Array.prototype.length)
492 let unscopables1 = Array.prototype[Symbol.unscopables];
493 let unscopables2 = Array.prototype[Symbol.unscopables];
505 var arr_copywithin2 = new Array();
507 var arr_copywithin3 = new Array();
514 var arr_copywithin4 = new Array();
549 var arr_every2 = new Array();
566 var arr_every3 = new Array();
573 var arr_every4 = new Array();
586 var arr_reduceRight2 = new Array();
602 var arr_reduceRight3 = new Array();
609 var arr_reduceRight4 = new Array();
622 var arr_some2 = new Array();
632 var arr_some3 = new Array();
681 var arr_toSorted2 = new Array();
787 v23.filter(Array);
885 * @tc.desc:test Array
898 [Array.from([1, 2, 3]), Array.from([4, 5, 6])],
920 const arr2 = new Array(-1);
927 * @tc.desc:test Array
930 const newArray = Array.from(originalArrays);
936 Array.from([1, 2, 3], "not a function");
942 Array.from([1, 2, 3], () => { throw new Error("Something went wrong"); });
948 Array.from(123);
949 Array.from({});
950 Array.from([1, 2, 3], () => {}, 123);
958 * @tc.desc:test Array
962 print(Array.isArray(array));
966 print(Array.isArray());
967 print(Array.isArray(123));
968 print(Array.isArray("not an array"));
969 print(Array.isArray(null));
970 print(Array.isArray(undefined));
977 * @tc.desc:test Array
980 const ArrayOf = Array.of(...originalArrays);
984 const arr1 = Array.of(undefined);
985 const arr2 = Array.of(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
994 * @tc.desc:test Array
1014 * @tc.desc:test Array
1022 print("Concatenated Array:", concatenatedArray);
1026 print("Nested Concatenated Array:", nestedConcatenatedArray);
1029 print("Mixed Concatenated Array:", mixedConcatenatedArray);
1032 print("Spread Concatenated Array:", spreadConcatenatedArray);
1036 * @tc.desc:test Array
1046 print("Copied Array 1:", copiedArray1);
1047 print("Copied Array 2:", copiedArray2);
1048 print("Copied Array 3:", copiedArray3);
1049 print("Copied Array 4:", copiedArray4);
1050 print("Copied Array 5:", copiedArray5);
1059 * @tc.desc:test Array
1102 * @tc.desc:test Array
1115 const array4 = new Array(5);
1118 const array5 = Array.from({ length: 5 }, (_, index) => index + 1);
1121 const array6 = Array.from({ length: 5 }, (_, index) => index + 1);
1124 const array7 = Array(5).fill("hello");
1150 * @tc.desc:test Array
1197 * @tc.desc:test Array
1208 print(array.find(item => Array.isArray(item)));
1246 * @tc.desc:test Array
1257 print(array.findIndex(item => Array.isArray(item)));
1295 * @tc.desc:test Array
1306 print(array.findLast(item => Array.isArray(item)));
1344 * @tc.desc:test Array
1355 print(array.findLastIndex(item => Array.isArray(item)));
1393 * @tc.desc:test Array
1437 * @tc.desc:test Array
1457 * @tc.desc:test Array
1475 * @tc.desc:test Array
1496 print(`Array: [${array.join(', ')}], Target: ${target}, Result: ${result}`);
1501 * @tc.desc:test Array
1523 * @tc.desc:test Array
1542 * @tc.desc:test Array
1576 * @tc.desc:test Array
1599 * @tc.desc:test Array
1630 * @tc.desc:test Array
1656 * @tc.desc:test Array
1690 * @tc.desc:test Array
1713 * @tc.desc:test Array
1736 * @tc.desc:test Array
1759 * @tc.desc:test Array
1786 * @tc.desc:test Array
1809 * @tc.desc:test Array
1836 * @tc.desc:test Array
1863 * @tc.desc:test Array
1890 * @tc.desc:test Array
1909 * @tc.desc:test Array
1946 * @tc.desc:test Array
2004 * @tc.desc:test Array
2009 print(Array.isArray([]));
2010 print(Array.isArray([1]));
2011 print(Array.isArray(new Array()));
2012 print(Array.isArray(new Array("a", "b", "c", "d")));
2013 print(Array.isArray(new Array(3)));
2014 print(Array.isArray(Array.prototype));
2017 print(Array.isArray());
2018 print(Array.isArray({}));
2019 print(Array.isArray(null));
2020 print(Array.isArray(undefined));
2021 print(Array.isArray(17));
2022 print(Array.isArray("Array"));
2023 print(Array.isArray(true));
2024 print(Array.isArray(false));
2025 print(Array.isArray(new Uint8Array(32)));
2026 print(Array.isArray({ __proto__: Array.prototype }));