Created
August 5, 2010 08:50
-
-
Save pedrodelgallego/509451 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| //CHECK#1 | |
| try { | |
| var x = []; | |
| x.length = NaN; | |
| $ERROR('#1.1: x = []; x.length = NaN throw RangeError. Actual: x.length === ' + (x.length)); | |
| } catch(e) { | |
| if ((e instanceof RangeError) !== true) { | |
| $ERROR('#1.2: x = []; x.length = NaN throw RangeError. Actual: ' + (e)); | |
| } | |
| } | |
| //CHECK#4 | |
| try { | |
| x = []; | |
| x.length = undefined; | |
| $ERROR('#4.1: x = []; x.length = undefined throw RangeError. Actual: x.length === ' + (x.length)); | |
| } catch(e) { | |
| if ((e instanceof RangeError) !== true) { | |
| $ERROR('#4.2: x = []; x.length = undefined throw RangeError. Actual: ' + (e)); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment