mirror of https://github.com/tc39/test262.git
add flatten/flatMap to features.txt and mark appropriate tests
This commit is contained in:
parent
d8233624aa
commit
041da54c02
|
@ -55,6 +55,11 @@ regexp-unicode-property-escapes
|
|||
Atomics
|
||||
SharedArrayBuffer
|
||||
|
||||
# Array.prototype.flatten and Array.prototype.flatMap
|
||||
# https://github.com/tc39/proposal-flatMap
|
||||
Array.prototype.flatten
|
||||
Array.prototype.flatMap
|
||||
|
||||
# Standard language features
|
||||
#
|
||||
# Language features that have been included in a published version of the
|
||||
|
|
|
@ -5,6 +5,7 @@ esid: sec-array.prototype.flatMap
|
|||
description: >
|
||||
array-like objects can be flattened
|
||||
includes: [compareArray.js]
|
||||
features: [Array.prototype.flatMap]
|
||||
---*/
|
||||
|
||||
function getArgumentsObject() {
|
||||
|
|
|
@ -5,6 +5,7 @@ esid: sec-array.prototype.flatMap
|
|||
description: >
|
||||
Behavior when given a bound function
|
||||
includes: [compareArray.js]
|
||||
features: [Array.prototype.flatMap]
|
||||
---*/
|
||||
|
||||
var a = [0, 0];
|
||||
|
|
|
@ -5,6 +5,7 @@ esid: sec-array.prototype.flatMap
|
|||
description: >
|
||||
Behavior when array is depth more than 1
|
||||
includes: [compareArray.js]
|
||||
features: [Array.prototype.flatMap]
|
||||
---*/
|
||||
|
||||
assert.compareArray([1, 2].flatMap(function(e) {
|
||||
|
|
|
@ -6,6 +6,7 @@ description: Array.prototype.flatMap.length value and descriptor.
|
|||
info: >
|
||||
17 ECMAScript Standard Built-in Objects
|
||||
includes: [propertyHelper.js]
|
||||
features: [Array.prototype.flatMap]
|
||||
---*/
|
||||
|
||||
assert.sameValue(
|
||||
|
|
|
@ -6,6 +6,7 @@ description: Array.prototype.flatmap name value and descriptor.
|
|||
info: >
|
||||
17 ECMAScript Standard Built-in Objects
|
||||
includes: [propertyHelper.js]
|
||||
features: [Array.prototype.flatMap]
|
||||
---*/
|
||||
|
||||
assert.sameValue(
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
esid: sec-array.prototype.flatMap
|
||||
description: >
|
||||
non callable argument should throw TypeError Exception
|
||||
features: [Array.prototype.flatMap]
|
||||
---*/
|
||||
|
||||
assert.throws(TypeError, function () {
|
||||
|
|
|
@ -5,6 +5,7 @@ esid: sec-array.prototype.flatMap
|
|||
description: >
|
||||
Behavior when `constructor` property is neither an Object nor undefined
|
||||
- if IsConstructor(C) is false, throw a TypeError exception.
|
||||
features: [Array.prototype.flatMap]
|
||||
---*/
|
||||
|
||||
var a = [];
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
esid: sec-array.prototype.flatMap
|
||||
description: >
|
||||
null or undefined should throw TypeError Exception
|
||||
features: [Array.prototype.flatMap]
|
||||
---*/
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
|
|
|
@ -7,6 +7,7 @@ description: >
|
|||
Array.prototype.flatMap ( mapperFunction [ , thisArg ] )
|
||||
includes: [compareArray.js]
|
||||
flags: [onlyStrict]
|
||||
features: [Array.prototype.flatMap]
|
||||
---*/
|
||||
|
||||
var a = {};
|
||||
|
|
|
@ -5,6 +5,7 @@ esid: sec-array.prototype.flatten
|
|||
description: >
|
||||
array-like objects can be flattened
|
||||
includes: [compareArray.js]
|
||||
features: [Array.prototype.flatten]
|
||||
---*/
|
||||
|
||||
function getArgumentsObject() {
|
||||
|
|
|
@ -5,6 +5,7 @@ esid: sec-array.prototype.flatten
|
|||
description: >
|
||||
using bound functions
|
||||
includes: [compareArray.js]
|
||||
features: [Array.prototype.flatten]
|
||||
---*/
|
||||
|
||||
var a = [[0],[1]];
|
||||
|
|
|
@ -5,6 +5,7 @@ esid: sec-array.prototype.flatten
|
|||
description: >
|
||||
arrays with empty arrays elements
|
||||
includes: [compareArray.js]
|
||||
features: [Array.prototype.flatten]
|
||||
---*/
|
||||
|
||||
var a = {};
|
||||
|
|
|
@ -5,6 +5,7 @@ esid: sec-array.prototype.flatten
|
|||
description: >
|
||||
arrays with empty object elements
|
||||
includes: [compareArray.js]
|
||||
features: [Array.prototype.flatten]
|
||||
---*/
|
||||
|
||||
var a = {}, b = {};
|
||||
|
|
|
@ -6,6 +6,7 @@ description: Array.prototype.flatten.length value and descriptor.
|
|||
info: >
|
||||
17 ECMAScript Standard Built-in Objects
|
||||
includes: [propertyHelper.js]
|
||||
features: [Array.prototype.flatten]
|
||||
---*/
|
||||
|
||||
assert.sameValue(
|
||||
|
|
|
@ -7,6 +7,7 @@ description: >
|
|||
info: >
|
||||
17 ECMAScript Standard Built-in Objects
|
||||
includes: [propertyHelper.js]
|
||||
features: [Array.prototype.flatten]
|
||||
---*/
|
||||
|
||||
assert.sameValue(
|
||||
|
|
|
@ -5,6 +5,7 @@ esid: sec-array.prototype.flatten
|
|||
description: >
|
||||
if the argument is a string or object, the depthNum is 0
|
||||
includes: [compareArray.js]
|
||||
features: [Array.prototype.flatten]
|
||||
---*/
|
||||
|
||||
var a = [1, [2]];
|
||||
|
|
|
@ -5,6 +5,7 @@ esid: sec-array.prototype.flatten
|
|||
description: >
|
||||
Behavior when `constructor` property is neither an Object nor undefined
|
||||
- if IsConstructor(C) is false, throw a TypeError exception.
|
||||
features: [Array.prototype.flatten]
|
||||
---*/
|
||||
|
||||
var a = [];
|
||||
|
|
|
@ -5,7 +5,9 @@ esid: sec-array.prototype.flatten
|
|||
description: >
|
||||
arrays with null, and undefined
|
||||
includes: [compareArray.js]
|
||||
features: [Array.prototype.flatten]
|
||||
---*/
|
||||
|
||||
var a = [void 0];
|
||||
|
||||
assert(compareArray([1, null, void 0].flatten(), [1, null, undefined]));
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
esid: sec-array.prototype.flatten
|
||||
description: >
|
||||
null or undefined should throw TypeError Exception
|
||||
features: [Array.prototype.flatten]
|
||||
---*/
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
|
|
|
@ -5,6 +5,7 @@ esid: sec-array.prototype.flatten
|
|||
description: >
|
||||
if the argument is a positive infinity, the depthNum is max depth of the array
|
||||
includes: [compareArray.js]
|
||||
features: [Array.prototype.flatten]
|
||||
---*/
|
||||
|
||||
var a = [1, [2, [3, [4]]]]
|
||||
|
|
|
@ -7,6 +7,7 @@ description: Property type and descriptor.
|
|||
info: >
|
||||
17 ECMAScript Standard Built-in Objects
|
||||
includes: [propertyHelper.js]
|
||||
features: [Array.prototype.flatten]
|
||||
---*/
|
||||
|
||||
assert.sameValue(
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
esid: sec-array.prototype.flatten
|
||||
description: >
|
||||
if the argument is a Symbol or Object null, it throws exception
|
||||
features: [Array.prototype.flatten]
|
||||
---*/
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
|
|
Loading…
Reference in New Issue