mirror of https://github.com/tc39/test262.git
Improve coverage by invoking functions as intended
Some tests which include function declarations designed to verify behavior do not reference those functions. Insert the references necessary for those functions to serve their intended purpose.
This commit is contained in:
parent
addfd8bf3d
commit
a6834093aa
|
@ -15,3 +15,5 @@ yield 9
|
|||
9
|
||||
//- teardown
|
||||
}
|
||||
var iter = g();
|
||||
while (iter.next().done === false) ;
|
||||
|
|
|
@ -25,7 +25,7 @@ Object.defineProperty(obj, "0", {
|
|||
configurable: true
|
||||
});
|
||||
|
||||
Array.prototype.reduce.call(obj, function() {}, "initialValue");
|
||||
Array.prototype.reduce.call(obj, callbackfn, "initialValue");
|
||||
|
||||
assert.sameValue(accessed, false, 'accessed');
|
||||
assert.sameValue(callbackAccessed, false, 'callbackAccessed');
|
||||
|
|
|
@ -9,9 +9,10 @@ description: >
|
|||
---*/
|
||||
|
||||
var accessed = false;
|
||||
var callbackAccessed = false;
|
||||
|
||||
function callbackfn() {
|
||||
accessed = true;
|
||||
callbackAccessed = true;
|
||||
}
|
||||
|
||||
var obj = {
|
||||
|
@ -26,6 +27,7 @@ Object.defineProperty(obj, "5", {
|
|||
configurable: true
|
||||
});
|
||||
|
||||
Array.prototype.reduceRight.call(obj, function() {}, "initialValue");
|
||||
Array.prototype.reduceRight.call(obj, callbackfn, "initialValue");
|
||||
|
||||
assert.sameValue(accessed, false, 'accessed');
|
||||
assert.sameValue(callbackAccessed, false, 'callbackAccessed');
|
||||
|
|
|
@ -6,6 +6,7 @@ author: Brian Terlson <brian.terlson@microsoft.com>
|
|||
esid: pending
|
||||
description: >
|
||||
Await throws errors from rejected promises
|
||||
flags: [async]
|
||||
---*/
|
||||
|
||||
async function foo() {
|
||||
|
@ -21,3 +22,4 @@ async function foo() {
|
|||
assert(caught);
|
||||
}
|
||||
|
||||
foo().then($DONE, $DONE);
|
||||
|
|
|
@ -92,3 +92,5 @@ assert.sameValue(
|
|||
);
|
||||
|
||||
}
|
||||
var iter = g();
|
||||
while (iter.next().done === false) ;
|
||||
|
|
|
@ -65,3 +65,5 @@ assert.sameValue(
|
|||
);
|
||||
|
||||
}
|
||||
var iter = g();
|
||||
while (iter.next().done === false) ;
|
||||
|
|
|
@ -62,3 +62,5 @@ assert.sameValue(
|
|||
);
|
||||
|
||||
}
|
||||
var iter = g();
|
||||
while (iter.next().done === false) ;
|
||||
|
|
|
@ -66,3 +66,5 @@ assert.sameValue(
|
|||
);
|
||||
|
||||
}
|
||||
var iter = g();
|
||||
while (iter.next().done === false) ;
|
||||
|
|
|
@ -39,3 +39,5 @@ assert.sameValue(
|
|||
);
|
||||
|
||||
}
|
||||
var iter = g();
|
||||
while (iter.next().done === false) ;
|
||||
|
|
|
@ -92,3 +92,5 @@ assert.sameValue(
|
|||
);
|
||||
|
||||
}
|
||||
var iter = g();
|
||||
while (iter.next().done === false) ;
|
||||
|
|
|
@ -65,3 +65,5 @@ assert.sameValue(
|
|||
);
|
||||
|
||||
}
|
||||
var iter = g();
|
||||
while (iter.next().done === false) ;
|
||||
|
|
|
@ -62,3 +62,5 @@ assert.sameValue(
|
|||
);
|
||||
|
||||
}
|
||||
var iter = g();
|
||||
while (iter.next().done === false) ;
|
||||
|
|
|
@ -66,3 +66,5 @@ assert.sameValue(
|
|||
);
|
||||
|
||||
}
|
||||
var iter = g();
|
||||
while (iter.next().done === false) ;
|
||||
|
|
Loading…
Reference in New Issue