Make doneprinthandle.js accept the input and produce the output expected by test262-harness. (#1650)

This is not a breaking change, it simply adds explicit handling to the function
This commit is contained in:
Rick Waldron 2018-07-25 20:06:52 -04:00 committed by Leo Balter
parent eb6a48dea6
commit 4314e2cab3
1 changed files with 10 additions and 5 deletions

View File

@ -5,13 +5,18 @@ description: |
---*/ ---*/
function __consolePrintHandle__(msg){ function __consolePrintHandle__(msg) {
print(msg); print(msg);
} }
function $DONE(){ function $DONE(error) {
if(!arguments[0]) if (error) {
if(typeof error === 'object' && error !== null && 'name' in error) {
__consolePrintHandle__('Test262:AsyncTestFailure:' + error.name + ': ' + error.message);
} else {
__consolePrintHandle__('Test262:AsyncTestFailure:Test262Error: ' + error);
}
} else {
__consolePrintHandle__('Test262:AsyncTestComplete'); __consolePrintHandle__('Test262:AsyncTestComplete');
else }
__consolePrintHandle__('Test262:AsyncTestFailure:' + arguments[0]);
} }