adding a test for parenthesized throws

This commit is contained in:
Jeremy Ashkenas 2010-02-17 19:29:37 -05:00
parent 2b5d596e10
commit 6a45d25777
2 changed files with 5 additions and 4 deletions

View File

@ -43,11 +43,10 @@ task 'test', 'run the CoffeeScript language test suite', ->
process.mixin require 'assert'
test_count: 0
start_time: new Date()
original_ok: ok
[original_ok, original_throws]: [ok, throws]
process.mixin {
ok: (args...) ->
test_count += 1
original_ok(args...)
ok: (args...) -> test_count += 1; original_ok(args...)
throws: (args...) -> test_count += 1; original_throws(args...)
}
process.addListener 'exit', ->
time: ((new Date() - start_time) / 1000).toFixed(2)

View File

@ -0,0 +1,2 @@
block: -> (throw 'up')
throws block, 'up'