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:
Mike Pennisi 2021-10-05 14:15:19 -04:00 committed by Rick Waldron
parent addfd8bf3d
commit a6834093aa
13 changed files with 27 additions and 3 deletions

View File

@ -15,3 +15,5 @@ yield 9
9
//- teardown
}
var iter = g();
while (iter.next().done === false) ;

View File

@ -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');

View File

@ -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');

View File

@ -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);

View File

@ -92,3 +92,5 @@ assert.sameValue(
);
}
var iter = g();
while (iter.next().done === false) ;

View File

@ -65,3 +65,5 @@ assert.sameValue(
);
}
var iter = g();
while (iter.next().done === false) ;

View File

@ -62,3 +62,5 @@ assert.sameValue(
);
}
var iter = g();
while (iter.next().done === false) ;

View File

@ -66,3 +66,5 @@ assert.sameValue(
);
}
var iter = g();
while (iter.next().done === false) ;

View File

@ -39,3 +39,5 @@ assert.sameValue(
);
}
var iter = g();
while (iter.next().done === false) ;

View File

@ -92,3 +92,5 @@ assert.sameValue(
);
}
var iter = g();
while (iter.next().done === false) ;

View File

@ -65,3 +65,5 @@ assert.sameValue(
);
}
var iter = g();
while (iter.next().done === false) ;

View File

@ -62,3 +62,5 @@ assert.sameValue(
);
}
var iter = g();
while (iter.next().done === false) ;

View File

@ -66,3 +66,5 @@ assert.sameValue(
);
}
var iter = g();
while (iter.next().done === false) ;