File: numbers_bigint.coffee

package info (click to toggle)
coffeescript 2.7.0%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,360 kB
  • sloc: makefile: 20; xml: 9; sh: 6; javascript: 5
file content (17 lines) | stat: -rw-r--r-- 379 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 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