Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
concurrency
/
select_auto_sync_test.v
17
lines
·
15
sloc
·
205 bytes
·
05e7d10bc19c48abaf97a4fc7bf72aeb946697ee
Raw
1
import
time
2
3
fn
test_main() {
4
select {
5
1 * time.second {}
6
}
7
assert
true
8
}
9
10
fn
test_select_accepts_duration_timeout() {
11
v := chan int{}
12
select {
13
_ := <-v {}
14
time.millisecond {}
15
}
16
assert
true
17
}
18