diff --git a/test/harness/gs.js b/test/harness/gs.js index 37ad387f59ff45f0571c706e6f0d5b074ad82142..bd57897c944023d0b2b29d40b319a6261eae3362 100644 --- a/test/harness/gs.js +++ b/test/harness/gs.js @@ -25,11 +25,11 @@ if (testDescrip.negative !== undefined) { if (window.iframeError === undefined) { //no exception was thrown testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code, typeof testDescrip.precondition !== 'undefined' ? testDescrip.precondition.toString() : '', 'fail', - Error('No exception was thrown; expected "' + testDescrip.negative + '".')); + Error('No exception was thrown; expected an error "message" property matching the regular expression "' + testDescrip.negative + '".')); } else if (!(new RegExp(testDescrip.negative, "i").test(window.iframeError))) { //wrong type of exception thrown testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code, typeof testDescrip.precondition !== 'undefined' ? testDescrip.precondition.toString() : '', 'fail', - Error('Expected an exception matching "' + testDescrip.negative +'" to be thrown; actual was "' + window.iframeError + '".')); + Error('Expected an exception with a "message" property matching the regular expression "' + testDescrip.negative +'" to be thrown; actual was "' + window.iframeError + '".')); } else { testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code, typeof testDescrip.precondition !== 'undefined' ? testDescrip.precondition.toString() : '', 'pass', undefined); diff --git a/website/resources/scripts/global/gs.js b/website/resources/scripts/global/gs.js index 37ad387f59ff45f0571c706e6f0d5b074ad82142..bd57897c944023d0b2b29d40b319a6261eae3362 100644 --- a/website/resources/scripts/global/gs.js +++ b/website/resources/scripts/global/gs.js @@ -25,11 +25,11 @@ if (testDescrip.negative !== undefined) { if (window.iframeError === undefined) { //no exception was thrown testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code, typeof testDescrip.precondition !== 'undefined' ? testDescrip.precondition.toString() : '', 'fail', - Error('No exception was thrown; expected "' + testDescrip.negative + '".')); + Error('No exception was thrown; expected an error "message" property matching the regular expression "' + testDescrip.negative + '".')); } else if (!(new RegExp(testDescrip.negative, "i").test(window.iframeError))) { //wrong type of exception thrown testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code, typeof testDescrip.precondition !== 'undefined' ? testDescrip.precondition.toString() : '', 'fail', - Error('Expected an exception matching "' + testDescrip.negative +'" to be thrown; actual was "' + window.iframeError + '".')); + Error('Expected an exception with a "message" property matching the regular expression "' + testDescrip.negative +'" to be thrown; actual was "' + window.iframeError + '".')); } else { testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code, typeof testDescrip.precondition !== 'undefined' ? testDescrip.precondition.toString() : '', 'pass', undefined);