mirror of
https://github.com/tc39/test262.git
synced 2025-07-07 22:24:40 +02:00
Correct Array.prototype.fill tests (Fixes #63)
The expected results weren't correct.
This commit is contained in:
parent
64756c252e
commit
e256a76e9d
@ -12,7 +12,7 @@ runTestCase(function () {
|
|||||||
var testArr = new Array('testString', 'anotherTestString', 3),
|
var testArr = new Array('testString', 'anotherTestString', 3),
|
||||||
updatedArr = testArr.fill('newValue', 1, 3);
|
updatedArr = testArr.fill('newValue', 1, 3);
|
||||||
|
|
||||||
if (updatedArr[3] !== 'newValue') {
|
if (updatedArr[3] !== void 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,11 +20,15 @@ runTestCase(function () {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (updatedArr[1] !== 'newValue') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (updatedArr[0] !== 'testString') {
|
if (updatedArr[0] !== 'testString') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (updatedArr.length !== 4) {
|
if (updatedArr.length !== 3) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user