Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
options
/
option_map_none_test.v
17
lines
·
16
sloc
·
204 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
fn
test_main() {
2
mut
a := {
3
'foo'
: ?int(1)
4
'bar'
:
none
5
}
6
a[
'foo'
] = 1
7
assert dump(a) == a
8
}
9
10
fn
test_none() {
11
mut
a := {
12
'foo'
: ?int(1)
13
'bar'
:
none
14
}
15
a[
'foo'
] =
none
16
assert dump(a) == a
17
}
18