1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00
jashkenas--coffeescript/test/numbers_bigint.coffee
Robert de Forest 09c95394e1 Fix #5103: Add support for BigInt literals (#5104)
* Fix #5103: Add support for BigInt literals

* Fix typos found in testing

* Support binary, octal and hex BigInt literals

* Make decimal BigInt test consistent other bases

* Correct test BigInt test names

* Add Node versions to CI
2019-11-26 21:15:03 -08:00

17 lines
379 B
CoffeeScript

# BigInt Literals
# ---------------
test "BigInt exists", ->
'object' is typeof BigInt
test "Parser recognizes decimal BigInt literals", ->
eq 42n, BigInt 42
test "Parser recognizes binary BigInt literals", ->
eq 42n, 0b101010n
test "Parser recognizes octal BigInt literals", ->
eq 42n, 0o52n
test "Parser recognizes hexadecimal BigInt literals", ->
eq 42n, 0x2an