mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
09c95394e1
* 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
17 lines
379 B
CoffeeScript
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
|