mirror of
https://github.com/tc39/test262.git
synced 2025-10-18 22:33:56 +02:00
Remove print calls in sm/Array
This commit is contained in:
parent
2d3d609041
commit
7dd0174ed1
@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Don't use a shared-permanent inherited property to implement [].length or (function(){}).length
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 548671;
|
|
||||||
var summary =
|
|
||||||
"Don't use a shared-permanent inherited property to implement " +
|
|
||||||
"[].length or (function(){}).length";
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
var a = [];
|
var a = [];
|
||||||
a.p = 1;
|
a.p = 1;
|
||||||
@ -29,5 +18,3 @@ var x = Object.create(a);
|
|||||||
assert.sameValue(x.length, 0);
|
assert.sameValue(x.length, 0);
|
||||||
assert.sameValue(x.p, 1);
|
assert.sameValue(x.p, 1);
|
||||||
assert.sameValue(a.length, 0);
|
assert.sameValue(a.length, 0);
|
||||||
|
|
||||||
print("All tests passed!");
|
|
||||||
|
@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Array.prototype.concat should check HasProperty everytime for non-dense array
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
var BUGNUMBER = 1287520;
|
|
||||||
var summary = 'Array.prototype.concat should check HasProperty everytime for non-dense array';
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
var a = [1, 2, 3];
|
var a = [1, 2, 3];
|
||||||
a.constructor = {
|
a.constructor = {
|
||||||
@ -31,4 +27,3 @@ var p = a.concat();
|
|||||||
assert.sameValue(0 in p, true);
|
assert.sameValue(0 in p, true);
|
||||||
assert.sameValue(1 in p, false);
|
assert.sameValue(1 in p, false);
|
||||||
assert.sameValue(2 in p, true);
|
assert.sameValue(2 in p, true);
|
||||||
|
|
||||||
|
@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js, deepEqual.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Array.prototype.fill
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 911147;
|
|
||||||
var summary = 'Array.prototype.fill';
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
assert.sameValue(typeof [].fill, 'function');
|
assert.sameValue(typeof [].fill, 'function');
|
||||||
assert.sameValue([].fill.length, 1);
|
assert.sameValue([].fill.length, 1);
|
||||||
@ -101,4 +92,3 @@ assert.throws(TypeError, () => [].fill.call(frozenArray, 2));
|
|||||||
assert.throws(TypeError, () => [].fill.call("111", 2));
|
assert.throws(TypeError, () => [].fill.call("111", 2));
|
||||||
assert.throws(TypeError, () => [].fill.call(null, 2));
|
assert.throws(TypeError, () => [].fill.call(null, 2));
|
||||||
assert.throws(TypeError, () => [].fill.call(undefined, 2));
|
assert.throws(TypeError, () => [].fill.call(undefined, 2));
|
||||||
|
|
||||||
|
@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Array.from should close iterator on error
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
var BUGNUMBER = 1180306;
|
|
||||||
var summary = 'Array.from should close iterator on error';
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
function test(ctor, { mapVal=undefined,
|
function test(ctor, { mapVal=undefined,
|
||||||
nextVal=undefined,
|
nextVal=undefined,
|
||||||
@ -189,4 +185,3 @@ test(Array, {
|
|||||||
nextVal: { value: 1, done: false },
|
nextVal: { value: 1, done: false },
|
||||||
closed: false,
|
closed: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Dense array properties shouldn't be modified when they're frozen
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
/*
|
/*
|
||||||
@ -14,10 +14,6 @@ esid: pending
|
|||||||
* http://creativecommons.org/licenses/publicdomain/
|
* http://creativecommons.org/licenses/publicdomain/
|
||||||
* Author: Emilio Cobos Álvarez <ecoal95@gmail.com>
|
* Author: Emilio Cobos Álvarez <ecoal95@gmail.com>
|
||||||
*/
|
*/
|
||||||
var BUGNUMBER = 1310744;
|
|
||||||
var summary = "Dense array properties shouldn't be modified when they're frozen";
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
var a = Object.freeze([4, 5, 1]);
|
var a = Object.freeze([4, 5, 1]);
|
||||||
|
|
||||||
@ -48,4 +44,3 @@ a[2] = "foo";
|
|||||||
assert.sameValue(delete a[0], false);
|
assert.sameValue(delete a[0], false);
|
||||||
|
|
||||||
assertArrayIsExpected();
|
assertArrayIsExpected();
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Freezing a dictionary mode object with a length property should make Object.isFrozen report true
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
/*
|
/*
|
||||||
@ -14,14 +14,9 @@ esid: pending
|
|||||||
* http://creativecommons.org/licenses/publicdomain/
|
* http://creativecommons.org/licenses/publicdomain/
|
||||||
* Author: Emilio Cobos Álvarez <ecoal95@gmail.com>
|
* Author: Emilio Cobos Álvarez <ecoal95@gmail.com>
|
||||||
*/
|
*/
|
||||||
var BUGNUMBER = 1312948;
|
|
||||||
var summary = "Freezing a dictionary mode object with a length property should make Object.isFrozen report true";
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/* Convert to dictionary mode */
|
/* Convert to dictionary mode */
|
||||||
delete Array.prototype.slice;
|
delete Array.prototype.slice;
|
||||||
|
|
||||||
Object.freeze(Array.prototype);
|
Object.freeze(Array.prototype);
|
||||||
assert.sameValue(Object.isFrozen(Array.prototype), true);
|
assert.sameValue(Object.isFrozen(Array.prototype), true);
|
||||||
|
|
||||||
|
@ -6,13 +6,8 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Array getters should have get prefix
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
var BUGNUMBER = 1180290;
|
|
||||||
var summary = 'Array getters should have get prefix';
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
assert.sameValue(Object.getOwnPropertyDescriptor(Array, Symbol.species).get.name, "get [Symbol.species]");
|
assert.sameValue(Object.getOwnPropertyDescriptor(Array, Symbol.species).get.name, "get [Symbol.species]");
|
||||||
|
|
||||||
|
@ -8,13 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Implement Array.prototype.includes
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
var BUGNUMBER = 1069063;
|
|
||||||
var summary = "Implement Array.prototype.includes";
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
assert.sameValue(typeof [].includes, "function");
|
assert.sameValue(typeof [].includes, "function");
|
||||||
assert.sameValue([].includes.length, 1);
|
assert.sameValue([].includes.length, 1);
|
||||||
@ -62,4 +58,3 @@ function assertFalse(v) {
|
|||||||
function staticIncludes(o, v, f) {
|
function staticIncludes(o, v, f) {
|
||||||
return [].includes.call(o, v, f);
|
return [].includes.call(o, v, f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,15 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Array.prototype.join
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
print("ES5: Array.prototype.join");
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
var count;
|
var count;
|
||||||
var stringifyCounter = { toString: function() { count++; return "obj"; } };
|
var stringifyCounter = { toString: function() { count++; return "obj"; } };
|
||||||
@ -80,7 +74,3 @@ var funky =
|
|||||||
};
|
};
|
||||||
var trailingHoles = [0, funky, /* 2 */, /* 3 */,];
|
var trailingHoles = [0, funky, /* 2 */, /* 3 */,];
|
||||||
assert.sameValue(trailingHoles.join(""), "0funkyfnord");
|
assert.sameValue(trailingHoles.join(""), "0funkyfnord");
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("Tests complete");
|
|
||||||
|
@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Object.preventExtensions([]).length = 0 should do nothing, not throw
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 600392;
|
|
||||||
var summary =
|
|
||||||
'Object.preventExtensions([]).length = 0 should do nothing, not throw';
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
|
|
||||||
function testEmpty()
|
function testEmpty()
|
||||||
{
|
{
|
||||||
@ -68,7 +57,3 @@ function testNonEmptyStrict()
|
|||||||
assert.sameValue(a.length, 0);
|
assert.sameValue(a.length, 0);
|
||||||
}
|
}
|
||||||
testNonEmptyStrict();
|
testNonEmptyStrict();
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("All tests passed!");
|
|
||||||
|
@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
No-op array length redefinition
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 858381;
|
|
||||||
var summary = "No-op array length redefinition";
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
var arr;
|
var arr;
|
||||||
|
|
||||||
@ -67,7 +58,3 @@ Object.defineProperty(arr, "length", { writable: false, configurable: false });
|
|||||||
Object.defineProperty(arr, "length", { writable: false, value: 8 });
|
Object.defineProperty(arr, "length", { writable: false, value: 8 });
|
||||||
Object.defineProperty(arr, "length", { configurable: false, value: 8 });
|
Object.defineProperty(arr, "length", { configurable: false, value: 8 });
|
||||||
Object.defineProperty(arr, "length", { writable: false, configurable: false, value: 8 });
|
Object.defineProperty(arr, "length", { writable: false, configurable: false, value: 8 });
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("Tests complete");
|
|
||||||
|
@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Various quirks of setting array length properties to objects
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 657298;
|
|
||||||
var summary = 'Various quirks of setting array length properties to objects';
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
function invokeConversionTwice1()
|
function invokeConversionTwice1()
|
||||||
{
|
{
|
||||||
@ -65,7 +56,3 @@ function dontOverwriteError2()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dontOverwriteError2();
|
dontOverwriteError2();
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("All tests passed!");
|
|
||||||
|
@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Array length redefinition behavior with non-configurable elements
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 858381;
|
|
||||||
var summary =
|
|
||||||
"Array length redefinition behavior with non-configurable elements";
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
function addDataProperty(obj, prop, value, enumerable, configurable, writable)
|
function addDataProperty(obj, prop, value, enumerable, configurable, writable)
|
||||||
{
|
{
|
||||||
@ -107,7 +97,3 @@ function strict()
|
|||||||
assert.sameValue(props[i], expected[i], "unexpected property: " + props[i]);
|
assert.sameValue(props[i], expected[i], "unexpected property: " + props[i]);
|
||||||
}
|
}
|
||||||
strict();
|
strict();
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("Tests complete");
|
|
||||||
|
@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Array length redefinition behavior with non-configurable elements
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 858381;
|
|
||||||
var summary =
|
|
||||||
"Array length redefinition behavior with non-configurable elements";
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
var arr = [0, 1, 2];
|
var arr = [0, 1, 2];
|
||||||
Object.defineProperty(arr, 1, { configurable: false });
|
Object.defineProperty(arr, 1, { configurable: false });
|
||||||
@ -45,7 +35,3 @@ assert.sameValue(desc.value, 2);
|
|||||||
assert.sameValue(desc.writable, false);
|
assert.sameValue(desc.writable, false);
|
||||||
assert.sameValue(desc.enumerable, false);
|
assert.sameValue(desc.enumerable, false);
|
||||||
assert.sameValue(desc.configurable, false);
|
assert.sameValue(desc.configurable, false);
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("Tests complete");
|
|
||||||
|
@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Array length setting/truncating with non-dense, indexed elements
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 858381;
|
|
||||||
var summary =
|
|
||||||
"Array length setting/truncating with non-dense, indexed elements";
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
function testTruncateDenseAndSparse()
|
function testTruncateDenseAndSparse()
|
||||||
{
|
{
|
||||||
@ -98,7 +88,3 @@ function testTruncateSparseShrinkCapacity()
|
|||||||
assert.sameValue(arr.length, 8);
|
assert.sameValue(arr.length, 8);
|
||||||
}
|
}
|
||||||
testTruncateSparseShrinkCapacity();
|
testTruncateSparseShrinkCapacity();
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("Tests complete");
|
|
||||||
|
@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Object.freeze([]).pop() must throw a TypeError
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 858381;
|
|
||||||
var summary = 'Object.freeze([]).pop() must throw a TypeError';
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -31,7 +22,3 @@ catch (e)
|
|||||||
assert.sameValue(e instanceof TypeError, true,
|
assert.sameValue(e instanceof TypeError, true,
|
||||||
"should have thrown TypeError, instead got: " + e);
|
"should have thrown TypeError, instead got: " + e);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("Tests complete");
|
|
||||||
|
@ -8,24 +8,12 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Array.prototype.pop shouldn't touch elements greater than length on non-arrays
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 909602;
|
|
||||||
var summary =
|
|
||||||
"Array.prototype.pop shouldn't touch elements greater than length on " +
|
|
||||||
"non-arrays";
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
function doTest(obj, index)
|
function doTest(obj, index)
|
||||||
{
|
{
|
||||||
// print("testing " + JSON.stringify(obj) + " with index " + index);
|
|
||||||
assert.sameValue(Array.prototype.pop.call(obj), undefined);
|
assert.sameValue(Array.prototype.pop.call(obj), undefined);
|
||||||
assert.sameValue(index in obj, true);
|
assert.sameValue(index in obj, true);
|
||||||
assert.sameValue(obj[index], 42);
|
assert.sameValue(obj[index], 42);
|
||||||
@ -90,7 +78,3 @@ function testPop6()
|
|||||||
}
|
}
|
||||||
for (var i = 0; i < 50; i++)
|
for (var i = 0; i < 50; i++)
|
||||||
testPop6();
|
testPop6();
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("Tests complete");
|
|
||||||
|
@ -8,22 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Assertion redefining length property of a frozen array
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 866580;
|
|
||||||
var summary = "Assertion redefining length property of a frozen array";
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
var arr = Object.freeze([]);
|
var arr = Object.freeze([]);
|
||||||
Object.defineProperty(arr, "length", {});
|
Object.defineProperty(arr, "length", {});
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("Tests complete");
|
|
||||||
|
@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Assertion redefining length property of a frozen dictionary-mode array
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 880591;
|
|
||||||
var summary =
|
|
||||||
"Assertion redefining length property of a frozen dictionary-mode array";
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
function convertToDictionaryMode(arr)
|
function convertToDictionaryMode(arr)
|
||||||
{
|
{
|
||||||
@ -33,7 +23,3 @@ var arr = [];
|
|||||||
convertToDictionaryMode(arr);
|
convertToDictionaryMode(arr);
|
||||||
Object.freeze(arr);
|
Object.freeze(arr);
|
||||||
Object.defineProperty(arr, "length", {});
|
Object.defineProperty(arr, "length", {});
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("Tests complete");
|
|
||||||
|
@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Assertion redefining non-writable length to a non-numeric value
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 866700;
|
|
||||||
var summary = "Assertion redefining non-writable length to a non-numeric value";
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
var count = 0;
|
var count = 0;
|
||||||
|
|
||||||
@ -42,7 +33,3 @@ Object.defineProperty(arr, "length", { value: convertible });
|
|||||||
assert.sameValue(count, 4);
|
assert.sameValue(count, 4);
|
||||||
|
|
||||||
assert.sameValue(arr.length, 0);
|
assert.sameValue(arr.length, 0);
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("Tests complete");
|
|
||||||
|
@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Assertion redefining non-writable length to a non-numeric value
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 866700;
|
|
||||||
var summary = "Assertion redefining non-writable length to a non-numeric value";
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
var count = 0;
|
var count = 0;
|
||||||
|
|
||||||
@ -55,7 +46,3 @@ catch (e)
|
|||||||
|
|
||||||
assert.sameValue(count, 1);
|
assert.sameValue(count, 1);
|
||||||
assert.sameValue(arr.length, 0);
|
assert.sameValue(arr.length, 0);
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("Tests complete");
|
|
||||||
|
@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Assertion redefining non-writable length to a non-numeric value
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 866700;
|
|
||||||
var summary = "Assertion redefining non-writable length to a non-numeric value";
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
var arr = [];
|
var arr = [];
|
||||||
Object.defineProperty(arr, "length", { value: 0, writable: false });
|
Object.defineProperty(arr, "length", { value: 0, writable: false });
|
||||||
@ -29,7 +20,3 @@ Object.defineProperty(arr, "length", { value: 0, writable: false });
|
|||||||
Object.defineProperty(arr, "length", { value: '' });
|
Object.defineProperty(arr, "length", { value: '' });
|
||||||
|
|
||||||
assert.sameValue(arr.length, 0);
|
assert.sameValue(arr.length, 0);
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("Tests complete");
|
|
||||||
|
@ -8,19 +8,14 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Array.reduce should ignore holes
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 386030;
|
|
||||||
var summary = 'Array.reduce should ignore holes';
|
|
||||||
var actual = '';
|
var actual = '';
|
||||||
var expect = '';
|
var expect = '';
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
test();
|
test();
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
function test()
|
function test()
|
||||||
{
|
{
|
||||||
@ -36,7 +31,7 @@ function test()
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
actual = "FAIL, reduce";
|
actual = "FAIL, reduce";
|
||||||
}
|
}
|
||||||
assert.sameValue(expect, actual, summary + ': 1');
|
assert.sameValue(expect, actual, '1');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
a = new Array(2);
|
a = new Array(2);
|
||||||
@ -45,7 +40,7 @@ function test()
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
actual = "FAIL, reduceRight";
|
actual = "FAIL, reduceRight";
|
||||||
}
|
}
|
||||||
assert.sameValue(expect, actual, summary + ': 2');
|
assert.sameValue(expect, actual, '2');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
a = new Array(2);
|
a = new Array(2);
|
||||||
@ -54,14 +49,14 @@ function test()
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
actual = "PASS";
|
actual = "PASS";
|
||||||
}
|
}
|
||||||
assert.sameValue(expect, actual, summary + ': 3');
|
assert.sameValue(expect, actual, '3');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
a = new Array(2);
|
a = new Array(2);
|
||||||
print(a.reduceRight(add));
|
a.reduceRight(add);
|
||||||
actual = "FAIL, empty reduceRight";
|
actual = "FAIL, empty reduceRight";
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
actual = "PASS";
|
actual = "PASS";
|
||||||
}
|
}
|
||||||
assert.sameValue(expect, actual, summary + ': 4');
|
assert.sameValue(expect, actual, '4');
|
||||||
}
|
}
|
||||||
|
@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
[].reverse should swap elements low to high using accesses to low elements, then accesses to high elements
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 858677;
|
|
||||||
var summary =
|
|
||||||
"[].reverse should swap elements low to high using accesses to low " +
|
|
||||||
"elements, then accesses to high elements";
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
var observed = [];
|
var observed = [];
|
||||||
|
|
||||||
@ -73,7 +62,7 @@ var expectedObserved =
|
|||||||
"index 6 get",
|
"index 6 get",
|
||||||
"index 2 get"
|
"index 2 get"
|
||||||
/* nothing for 3/4 */];
|
/* nothing for 3/4 */];
|
||||||
print(observed);
|
|
||||||
// Do this before the assertions below futz even more with |observed|.
|
// Do this before the assertions below futz even more with |observed|.
|
||||||
assert.sameValue(observed.length, expectedObserved.length);
|
assert.sameValue(observed.length, expectedObserved.length);
|
||||||
for (var i = 0; i < expectedObserved.length; i++)
|
for (var i = 0; i < expectedObserved.length; i++)
|
||||||
@ -87,7 +76,3 @@ assert.sameValue(4 in arr, false); // never there
|
|||||||
assert.sameValue(arr[5], "index 2 get"); // copies result of getter
|
assert.sameValue(arr[5], "index 2 get"); // copies result of getter
|
||||||
assert.sameValue(6 in arr, false); // deleted
|
assert.sameValue(6 in arr, false); // deleted
|
||||||
assert.sameValue(arr[7], "index 7 get"); // no deletion, setter doesn't overwrite
|
assert.sameValue(arr[7], "index 7 get"); // no deletion, setter doesn't overwrite
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("Tests complete");
|
|
||||||
|
@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Array.prototype.shift on a dense array with holes should update for-in enumeration properties.
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
var BUGNUMBER = 1247701;
|
|
||||||
var summary = 'Array.prototype.shift on a dense array with holes should update for-in enumeration properties.';
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
var x = ["a", , "b", , "c", "d" , "e", "f", "g"];
|
var x = ["a", , "b", , "c", "d" , "e", "f", "g"];
|
||||||
for (var p in x) {
|
for (var p in x) {
|
||||||
|
@ -8,21 +8,8 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
array.sort compare-function gets incorrect this
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 604971;
|
|
||||||
var summary = 'array.sort compare-function gets incorrect this';
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
[1, 2, 3].sort(function() { "use strict"; assert.sameValue(this, undefined); });
|
[1, 2, 3].sort(function() { "use strict"; assert.sameValue(this, undefined); });
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("All tests passed!");
|
|
||||||
|
@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Sorting an array containing only holes and |undefined| should move all |undefined| to the start of the array
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 664528;
|
|
||||||
var summary =
|
|
||||||
"Sorting an array containing only holes and |undefined| should move all " +
|
|
||||||
"|undefined| to the start of the array";
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
var a = [, , , undefined];
|
var a = [, , , undefined];
|
||||||
a.sort();
|
a.sort();
|
||||||
@ -31,7 +20,3 @@ assert.sameValue(a[0], undefined);
|
|||||||
assert.sameValue(a.hasOwnProperty(1), false);
|
assert.sameValue(a.hasOwnProperty(1), false);
|
||||||
assert.sameValue(a.hasOwnProperty(2), false);
|
assert.sameValue(a.hasOwnProperty(2), false);
|
||||||
assert.sameValue(a.hasOwnProperty(3), false);
|
assert.sameValue(a.hasOwnProperty(3), false);
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("Tests complete");
|
|
||||||
|
@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Use ArraySpeciesCreate in Array.prototype.{concat,filter,map,slice,splice}.
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
var BUGNUMBER = 1165052;
|
|
||||||
var summary = 'Use ArraySpeciesCreate in Array.prototype.{concat,filter,map,slice,splice}.';
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
var g = $262.createRealm().global;
|
var g = $262.createRealm().global;
|
||||||
|
|
||||||
@ -189,4 +185,3 @@ test("filter", [x => x % 2], 0, "get:filter,get:length,get:constructor,c-get:Sym
|
|||||||
test("map", [x => x * 2], 5, "get:map,get:length,get:constructor,c-get:Symbol(Symbol.species),get:0,define:0:2:true:true:true,get:1,define:1:4:true:true:true,get:2,define:2:6:true:true:true,get:3,define:3:8:true:true:true,get:4,define:4:10:true:true:true,");
|
test("map", [x => x * 2], 5, "get:map,get:length,get:constructor,c-get:Symbol(Symbol.species),get:0,define:0:2:true:true:true,get:1,define:1:4:true:true:true,get:2,define:2:6:true:true:true,get:3,define:3:8:true:true:true,get:4,define:4:10:true:true:true,");
|
||||||
test("slice", [], 5, "get:slice,get:length,get:constructor,c-get:Symbol(Symbol.species),get:0,define:0:1:true:true:true,get:1,define:1:2:true:true:true,get:2,define:2:3:true:true:true,get:3,define:3:4:true:true:true,get:4,define:4:5:true:true:true,set:length:5,");
|
test("slice", [], 5, "get:slice,get:length,get:constructor,c-get:Symbol(Symbol.species),get:0,define:0:1:true:true:true,get:1,define:1:2:true:true:true,get:2,define:2:3:true:true:true,get:3,define:3:4:true:true:true,get:4,define:4:5:true:true:true,set:length:5,");
|
||||||
test("splice", [0, 5], 5, "get:splice,get:length,get:constructor,c-get:Symbol(Symbol.species),get:0,define:0:1:true:true:true,get:1,define:1:2:true:true:true,get:2,define:2:3:true:true:true,get:3,define:3:4:true:true:true,get:4,define:4:5:true:true:true,set:length:5,");
|
test("splice", [0, 5], 5, "get:splice,get:length,get:constructor,c-get:Symbol(Symbol.species),get:0,define:0:1:true:true:true,get:1,define:1:2:true:true:true,get:2,define:2:3:true:true:true,get:3,define:3:4:true:true:true,get:4,define:4:5:true:true:true,set:length:5,");
|
||||||
|
|
||||||
|
@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Array.prototype.splice should define, not set, the elements of the array it returns
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 668024;
|
|
||||||
var summary =
|
|
||||||
'Array.prototype.splice should define, not set, the elements of the array ' +
|
|
||||||
'it returns';
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
Object.defineProperty(Object.prototype, 2,
|
Object.defineProperty(Object.prototype, 2,
|
||||||
{
|
{
|
||||||
@ -45,7 +34,3 @@ assert.sameValue(removed[2], 2);
|
|||||||
assert.sameValue(removed[3], 3);
|
assert.sameValue(removed[3], 3);
|
||||||
assert.sameValue(removed[4], 4);
|
assert.sameValue(removed[4], 4);
|
||||||
assert.sameValue(removed[5], 5);
|
assert.sameValue(removed[5], 5);
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("Tests complete");
|
|
||||||
|
@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Array.prototype.splice, when it deletes elements, should make sure any deleted but not visited elements are suppressed from subsequent enumeration
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 668024;
|
|
||||||
var summary =
|
|
||||||
'Array.prototype.splice, when it deletes elements, should make sure any ' +
|
|
||||||
'deleted but not visited elements are suppressed from subsequent enumeration';
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
var arr = [0, 1, 2, 3, 4, 5, , 7];
|
var arr = [0, 1, 2, 3, 4, 5, , 7];
|
||||||
|
|
||||||
@ -60,7 +49,3 @@ if (sawOneBeforeThree)
|
|||||||
// will delete "3", and therefore we must not see it.
|
// will delete "3", and therefore we must not see it.
|
||||||
assert.sameValue(seen.indexOf("3"), -1);
|
assert.sameValue(seen.indexOf("3"), -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("Tests complete");
|
|
||||||
|
@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Array.prototype.toLocaleString
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 562446;
|
|
||||||
var summary = 'ES5: Array.prototype.toLocaleString';
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
var o;
|
var o;
|
||||||
|
|
||||||
@ -34,7 +25,3 @@ arr = {length: {valueOf: function () { log += "L"; return 2; }},
|
|||||||
0: "x", 1: "z"};
|
0: "x", 1: "z"};
|
||||||
assert.sameValue(Array.prototype.toLocaleString.call(arr), "x,z");
|
assert.sameValue(Array.prototype.toLocaleString.call(arr), "x,z");
|
||||||
assert.sameValue(log, "L");
|
assert.sameValue(log, "L");
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("All tests passed!");
|
|
||||||
|
@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Array.prototype.toString
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 562446;
|
|
||||||
var summary = 'ES5: Array.prototype.toString';
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
var o;
|
var o;
|
||||||
|
|
||||||
@ -49,7 +40,3 @@ catch (e)
|
|||||||
"expected thrown e === 42 when calling [].toString on an object " +
|
"expected thrown e === 42 when calling [].toString on an object " +
|
||||||
"with a join getter that throws, got " + e);
|
"with a join getter that throws, got " + e);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("All tests passed!");
|
|
||||||
|
@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
|||||||
flags:
|
flags:
|
||||||
- noStrict
|
- noStrict
|
||||||
description: |
|
description: |
|
||||||
pending
|
Array.prototype.unshift without args
|
||||||
esid: pending
|
esid: pending
|
||||||
---*/
|
---*/
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
var BUGNUMBER = 614070;
|
|
||||||
var summary = 'Array.prototype.unshift without args';
|
|
||||||
|
|
||||||
print(BUGNUMBER + ": " + summary);
|
|
||||||
|
|
||||||
/**************
|
|
||||||
* BEGIN TEST *
|
|
||||||
**************/
|
|
||||||
|
|
||||||
// ES6 ToLength clamps length values to 2^53 - 1.
|
// ES6 ToLength clamps length values to 2^53 - 1.
|
||||||
var MAX_LENGTH = 2**53 - 1;
|
var MAX_LENGTH = 2**53 - 1;
|
||||||
@ -43,7 +34,3 @@ testGetSet("1", 1);
|
|||||||
testGetSet(null, 0);
|
testGetSet(null, 0);
|
||||||
testGetSet(MAX_LENGTH + 2, MAX_LENGTH);
|
testGetSet(MAX_LENGTH + 2, MAX_LENGTH);
|
||||||
testGetSet(-5, 0);
|
testGetSet(-5, 0);
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
print("All tests passed!");
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user