mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
scanner: make 0o
prefix the only way to define octals
This commit is contained in:
@ -11,7 +11,7 @@ fn test_atoi() {
|
||||
fn test_parse_int() {
|
||||
// Different bases
|
||||
assert strconv.parse_int('16', 16, 0) == 0x16
|
||||
assert strconv.parse_int('16', 8, 0) == 016
|
||||
assert strconv.parse_int('16', 8, 0) == 0o16
|
||||
assert strconv.parse_int('11', 2, 0) == 3
|
||||
// Different bit sizes
|
||||
assert strconv.parse_int('127', 10, 8) == 127
|
||||
|
Reference in New Issue
Block a user