mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
ci: use a smaller fixed size array for the const eval test (fixes failing windows job)
This commit is contained in:
parent
fd2845e955
commit
f5ebfefdc9
@ -1,18 +1,18 @@
|
||||
const kb = 1024
|
||||
|
||||
const buf_siz = 1024 * kb
|
||||
const buf_siz = 2 * kb
|
||||
|
||||
fn test_consts() {
|
||||
assert kb == 1024
|
||||
assert buf_siz == 1024 * kb
|
||||
assert buf_siz == 1048576
|
||||
assert buf_siz == 2 * kb
|
||||
assert buf_siz == 2048
|
||||
println(buf_siz)
|
||||
}
|
||||
|
||||
fn test_fixed_size_array_can_use_a_known_comptime_const_as_its_size() {
|
||||
buf := [buf_siz]byte{}
|
||||
println(buf.len)
|
||||
assert buf.len == 1048576
|
||||
assert buf.len == 2048
|
||||
}
|
||||
|
||||
fn test_fixed_size_array_using_a_known_int_expression_directly_as_its_size() {
|
||||
|
Loading…
Reference in New Issue
Block a user