Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
options
/
option_selector_cast_test.v
15
lines
·
13
sloc
·
230 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
@[params]
2
struct
ConnectParams {
3
password ?string
4
}
5
6
pub
fn
connect(params ConnectParams) ? {
7
password2 := ?string(params.password)
8
assert password2? ==
'foo'
9
}
10
11
fn
test_main() {
12
connect(ConnectParams{
13
password:
'foo'
14
})
15
}
16