mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-12 08:35:02 -05:00
cleaning up tests ... consolidation, consistency...
This commit is contained in:
45
test/test_compound_assignment.coffee
Normal file
45
test/test_compound_assignment.coffee
Normal file
@@ -0,0 +1,45 @@
|
||||
num: 10
|
||||
num: - 5
|
||||
|
||||
ok num is 5
|
||||
|
||||
num: -3
|
||||
|
||||
ok num is -3
|
||||
|
||||
num: +3
|
||||
|
||||
ok num is 3
|
||||
|
||||
num = * 10
|
||||
|
||||
ok num is 30
|
||||
|
||||
num: / 10
|
||||
|
||||
ok num is 3
|
||||
|
||||
|
||||
val: false
|
||||
val: or 'value'
|
||||
|
||||
ok val is 'value'
|
||||
|
||||
val = and 'other'
|
||||
|
||||
ok val is 'other'
|
||||
|
||||
|
||||
val: null
|
||||
val: ? 'value'
|
||||
|
||||
ok val is 'value'
|
||||
|
||||
|
||||
val: 6
|
||||
val: -(10)
|
||||
|
||||
ok val is -10
|
||||
|
||||
val: - (10)
|
||||
ok val is -20
|
||||
Reference in New Issue
Block a user