adding one more compound operator test for #2627

This commit is contained in:
Jeremy Ashkenas 2013-01-05 18:14:05 -10:00
parent 547a271cee
commit f8c751b3a4
1 changed files with 10 additions and 4 deletions

View File

@ -28,6 +28,12 @@ test "operators should respect new lines as spaced", ->
test "multiple operators should space themselves", ->
eq (+ +1), (- -1)
test "compound operators on successive lines", ->
a = 1
a +=
1
eq a, 2
test "bitwise operators", ->
eq 2, (10 & 3)
eq 11, (10 | 3)
@ -275,16 +281,16 @@ test "#2155 ... conditional assignment to a closure", ->
func = -> x ?= (-> if true then 'hi')
func()
eq x(), 'hi'
test "#2197: Existential existential double trouble", ->
counter = 0
func = -> counter++
func()? ? 100
eq counter, 1
test "#2567: Optimization of negated existential produces correct result", ->
a = 1
ok !(!a?)
ok !b?