1
0
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:
Delyan Angelov 2021-03-10 10:40:35 +02:00
parent fd2845e955
commit f5ebfefdc9
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -1,18 +1,18 @@
const kb = 1024 const kb = 1024
const buf_siz = 1024 * kb const buf_siz = 2 * kb
fn test_consts() { fn test_consts() {
assert kb == 1024 assert kb == 1024
assert buf_siz == 1024 * kb assert buf_siz == 2 * kb
assert buf_siz == 1048576 assert buf_siz == 2048
println(buf_siz) println(buf_siz)
} }
fn test_fixed_size_array_can_use_a_known_comptime_const_as_its_size() { fn test_fixed_size_array_can_use_a_known_comptime_const_as_its_size() {
buf := [buf_siz]byte{} buf := [buf_siz]byte{}
println(buf.len) 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() { fn test_fixed_size_array_using_a_known_int_expression_directly_as_its_size() {