-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce coupling between runner implementations and Test262 itself by automatically injecting Test262's definition of `$ERROR`.
- Loading branch information
1 parent
ac95cc8
commit 81244a5
Showing
9 changed files
with
55 additions
and
29 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/// Copyright (c) 2012 Ecma International. All rights reserved. | ||
/// Ecma International makes this code available under the terms and conditions set | ||
/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the | ||
/// "Use Terms"). Any redistribution of this code must retain the above | ||
/// copyright and this notice and otherwise comply with the Use Terms. | ||
|
||
var NotEarlyErrorString = "NotEarlyError"; | ||
var EarlyErrorRePat = "^((?!" + NotEarlyErrorString + ").)*$"; | ||
var NotEarlyError = new Error(NotEarlyErrorString); | ||
|
||
function Test262Error(message) { | ||
this.message = message || ""; | ||
} | ||
|
||
Test262Error.prototype.toString = function () { | ||
return "Test262Error: " + this.message; | ||
}; | ||
|
||
var $ERROR; | ||
$ERROR = function $ERROR(message) { | ||
throw new Test262Error(message); | ||
}; | ||
|
||
function testFailed(message) { | ||
$ERROR(message); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/// Copyright (c) 2012 Ecma International. All rights reserved. | ||
/// Ecma International makes this code available under the terms and conditions set | ||
/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the | ||
/// "Use Terms"). Any redistribution of this code must retain the above | ||
/// copyright and this notice and otherwise comply with the Use Terms. | ||
|
||
var NotEarlyErrorString = "NotEarlyError"; | ||
var EarlyErrorRePat = "^((?!" + NotEarlyErrorString + ").)*$"; | ||
var NotEarlyError = new Error(NotEarlyErrorString); | ||
|
||
function Test262Error(message) { | ||
this.message = message || ""; | ||
} | ||
|
||
Test262Error.prototype.toString = function () { | ||
return "Test262Error: " + this.message; | ||
}; | ||
|
||
var $ERROR; | ||
$ERROR = function $ERROR(message) { | ||
throw new Test262Error(message); | ||
}; | ||
|
||
function testFailed(message) { | ||
$ERROR(message); | ||
} |