mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
* 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
18 lines
379 B
CoffeeScript
18 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
|