1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

scanner: more checks for _ as num_sep (#5992)

This commit is contained in:
Swastik Baranwal
2020-07-28 11:39:19 +05:30
committed by GitHub
parent 5d49034c31
commit 8b66816bdc
2 changed files with 28 additions and 7 deletions

View File

@ -148,21 +148,18 @@ fn test_num_separator() {
// int
assert 100_000_0 == 1000000
assert -2_23_4_6 == -22346
assert 230_ == 230
// bin
assert 0b0_11 == 3
assert -0b0_100 == -4
assert 0b010_ == 2
// oct
assert 0o1_73 == 123
assert -0o17_5 == -125
assert -0o175_ == -125
assert -0o175 == -125
// hex
assert 0xFF == 255
assert 0xFF_ == 255
assert 0xF_F == 255
// f32 or f64