mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
21 lines
537 B
CoffeeScript
21 lines
537 B
CoffeeScript
# Boolean Literals
|
|
# ----------------
|
|
|
|
# TODO: add method invocation tests: true.toString() is "true"
|
|
|
|
test "#764 Booleans should be indexable", ->
|
|
toString = Boolean::toString
|
|
|
|
eq toString, true['toString']
|
|
eq toString, false['toString']
|
|
eq toString, yes['toString']
|
|
eq toString, no['toString']
|
|
eq toString, on['toString']
|
|
eq toString, off['toString']
|
|
|
|
eq toString, true.toString
|
|
eq toString, false.toString
|
|
eq toString, yes.toString
|
|
eq toString, no.toString
|
|
eq toString, on.toString
|
|
eq toString, off.toString
|