Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
assign
/
assign_option_of_fixed_array_test.v
8
lines
·
7
sloc
·
184 bytes
·
9a6e335601a3bf7f1a736633472081375f8204ce
Raw
1
type
Addr = [4]u8
2
3
fn
test_assign_option_of_fixed_array() {
4
mut
addr := ?Addr(
none
)
5
addr = Addr([u8(1), 2, 3, 4]!)
6
println(addr)
7
assert
'${addr}'
==
'Option(Addr([1, 2, 3, 4]))'
8
}
9