Skip to content

Commit

Permalink
[tests] FF allow negative Number#toFixed arguments and the spec all…
Browse files Browse the repository at this point in the history
…ow extended implementations
  • Loading branch information
zloirock committed Feb 1, 2016
1 parent aabe858 commit e79398e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/library.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/library/es6.number.to-fixed.ls
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ test 'Number#toFixed' (assert)!->
assert.same toFixed(1e21 NaN), String 1e21
assert.same toFixed(1e21 'some string'), String 1e21
assert.same (try toFixed 1e21 -0.1), String 1e21
assert.throws (!-> toFixed 1 -1), RangeError, 'If f < 0 or f > 20, throw a RangeError exception.'
assert.throws (!-> toFixed 1 -101), RangeError, 'If f < 0 or f > 20, throw a RangeError exception.'
assert.throws (!-> toFixed 1 101), RangeError, 'If f < 0 or f > 20, throw a RangeError exception.'
assert.throws (!-> toFixed NaN, Infinity), RangeError, 'If f < 0 or f > 20, throw a RangeError exception.'
assert.throws (!-> toFixed {}, 1), TypeError, '? thisNumberValue(this value)'
Expand Down
2 changes: 1 addition & 1 deletion tests/tests.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/tests/es6.number.to-fixed.ls
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ test 'Number#toFixed' (assert)!->
assert.same new Number(1e21).toFixed(NaN), String 1e21
assert.same new Number(1e21).toFixed('some string'), String 1e21
assert.same (try new Number(1e21).toFixed -0.1), String 1e21
assert.throws (!-> 1.0.toFixed -1), RangeError, 'If f < 0 or f > 20, throw a RangeError exception.'
assert.throws (!-> 1.0.toFixed -101), RangeError, 'If f < 0 or f > 20, throw a RangeError exception.'
assert.throws (!-> 1.0.toFixed 101), RangeError, 'If f < 0 or f > 20, throw a RangeError exception.'
assert.throws (!-> NaN.toFixed Infinity), RangeError, 'If f < 0 or f > 20, throw a RangeError exception.'
assert.throws (!-> toFixed.call {}, 1), TypeError, '? thisNumberValue(this value)'
Expand Down

0 comments on commit e79398e

Please sign in to comment.