mirror of
https://github.com/tc39/test262.git
synced 2025-07-03 20:24:38 +02:00
Just change in generated formatting
This commit is contained in:
parent
64db10aa2d
commit
68f00c57a3
@ -22,34 +22,62 @@
|
|||||||
|
|
||||||
//An exception is expected
|
//An exception is expected
|
||||||
if (testDescrip.negative !== undefined) {
|
if (testDescrip.negative !== undefined) {
|
||||||
//TODO - come up with a generic way of catching the error type from this.onerror
|
//TODO - come up with a generic way of catching the error type
|
||||||
|
//from this.onerror
|
||||||
testDescrip.negative = testDescrip.negative === "NotEarlyError" ?
|
testDescrip.negative = testDescrip.negative === "NotEarlyError" ?
|
||||||
testDescrip.negative : (testDescrip.negative === "^((?!NotEarlyError).)*$" ?
|
testDescrip.negative :
|
||||||
|
(testDescrip.negative === "^((?!NotEarlyError).)*$" ?
|
||||||
testDescrip.negative : ".");
|
testDescrip.negative : ".");
|
||||||
if (this.iframeError === undefined) { //no exception was thrown
|
if (this.iframeError === undefined) { //no exception was thrown
|
||||||
testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code,
|
testRun(testDescrip.id,
|
||||||
|
testDescrip.path,
|
||||||
|
testDescrip.description,
|
||||||
|
testDescrip.code,
|
||||||
'fail',
|
'fail',
|
||||||
Error('No exception was thrown; expected an error "message" property matching the regular expression "' + testDescrip.negative + '".'));
|
Error('No exception was thrown; expected an error "message"' +
|
||||||
} else if (!(new RegExp(testDescrip.negative, "i").test(this.iframeError))) { //wrong type of exception thrown
|
' property matching the regular expression "' +
|
||||||
testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code,
|
testDescrip.negative + '".'));
|
||||||
|
} else if (!(new RegExp(testDescrip.negative,
|
||||||
|
"i").test(this.iframeError))) {
|
||||||
|
//wrong type of exception thrown
|
||||||
|
testRun(testDescrip.id,
|
||||||
|
testDescrip.path,
|
||||||
|
testDescrip.description,
|
||||||
|
testDescrip.code,
|
||||||
'fail',
|
'fail',
|
||||||
Error('Expected an exception with a "message" property matching the regular expression "' + testDescrip.negative +'" to be thrown; actual was "' + this.iframeError + '".'));
|
Error('Expected an exception with a "message"' +
|
||||||
|
' property matching the regular expression "' +
|
||||||
|
testDescrip.negative +
|
||||||
|
'" to be thrown; actual was "' +
|
||||||
|
this.iframeError + '".'));
|
||||||
} else {
|
} else {
|
||||||
testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code,
|
testRun(testDescrip.id,
|
||||||
'pass', undefined);
|
testDescrip.path,
|
||||||
|
testDescrip.description,
|
||||||
|
testDescrip.code,
|
||||||
|
'pass',
|
||||||
|
undefined);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Exception was not expected to be thrown
|
//Exception was not expected to be thrown
|
||||||
else if (this.iframeError !== undefined) {
|
else if (this.iframeError !== undefined) {
|
||||||
testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code,
|
testRun(testDescrip.id,
|
||||||
|
testDescrip.path,
|
||||||
|
testDescrip.description,
|
||||||
|
testDescrip.code,
|
||||||
'fail',
|
'fail',
|
||||||
Error('Unexpected exception, "' + this.iframeError + '" was thrown.'));
|
Error('Unexpected exception, "' +
|
||||||
|
this.iframeError + '" was thrown.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code,
|
testRun(testDescrip.id,
|
||||||
'pass', undefined);
|
testDescrip.path,
|
||||||
|
testDescrip.description,
|
||||||
|
testDescrip.code,
|
||||||
|
'pass',
|
||||||
|
undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
testFinished();
|
testFinished();
|
Loading…
x
Reference in New Issue
Block a user