mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Ruby: add more tests for edge cases in parsing of integers
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -11,20 +11,33 @@ TRUE
|
||||
5_678
|
||||
0
|
||||
0d900
|
||||
2147483647 # max value representable by QL's int type
|
||||
2147483648 # too large to be representable by an int
|
||||
|
||||
# hexadecimal integers
|
||||
0x1234
|
||||
0xdeadbeef
|
||||
0xF00D_face
|
||||
0xbeef
|
||||
0xF0_0D
|
||||
0x000000000000000000ff
|
||||
0x7FFF_FFFF # max value representable by QL's int type
|
||||
0x80000000 # too large to be represented by an int
|
||||
0xdeadbeef # too large to be represented by an int
|
||||
0xF00D_face # too large to be represented by an int
|
||||
|
||||
# octal integers
|
||||
0123
|
||||
0o234
|
||||
0O45_6
|
||||
0000000000000000000000000000010
|
||||
017777777777 # max value representable by QL's int type
|
||||
020000000000 # too large to be represented by an int
|
||||
|
||||
# binary integers
|
||||
0b10010100
|
||||
0B011_01101
|
||||
0b00000000000000000000000000000000000000011
|
||||
0b01111111111111111111111111111111 # max value representable by QL's int type
|
||||
0b10000000000000000000000000000000 # too large to be represented by an int
|
||||
|
||||
# floating-point numbers
|
||||
12.34
|
||||
|
||||
Reference in New Issue
Block a user