ci: use a smaller fixed size array for the const eval test (fixes failing windows job)
parent
fd2845e955
commit
f5ebfefdc9
|
@ -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() {
|
||||||
|
|
Loading…
Reference in New Issue