v/vlib/v/fmt/tests/array_init_expected.vv

35 lines
673 B
V

fn main() {
if 1 == 1 {
println('yeah !')
}
if 1 != 1 {
println("oh no :'(")
}
}
fn wrapping_tests() {
my_arr := ['Lorem ipsum dolor sit amet, consectetur adipiscing',
'elit. Donec varius purus leo, vel maximus diam',
'finibus sed. Etiam eu urna ante. Nunc quis vehicula',
'velit. Sed at mauris et quam ornare tristique.']
}
fn array_init_without_commas() {
a := [3, -4, 5, -2]
b := [5 - 2, 7, 2 * 3, -4, -7 * 8, 2 * -4]
c := [4, 6 - 7, 8, 3 * 4]
d := [&a, &b, &c]
e := u16(434)
f := u16(23)
g := u16(4324)
h := [e & f, g, g & g]
k := 323
l := [k, -k, 5]
x := &e
y := &f
z := &g
q := [f, *y, f * g, e]
ch := chan u16{}
w := [f, 12 <- ch]
}