Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
options
/
option_push_array_opt_test.v
15
lines
·
12
sloc
·
222 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
fn
test_dump_array_opt_push_string() {
2
mut
vals := []?string{cap: 4}
3
vals <<
none
4
vals <<
'a'
5
vals <<
'b'
6
vals <<
'c'
7
8
t := dump(vals[0])
9
assert t ==
none
10
11
t2 := vals[0]
12
assert t2 ==
none
13
14
assert vals.len == 4
15
}
16