v / vlib / context / empty_test.v
18 lines · 16 sloc · 336 bytes · a80bc2331450fc28c900097f8afafe173f161d27
Raw
1// vtest build: amd64 || arm64
2module context
3
4fn test_background() {
5 ctx := background()
6 assert '&context.Background' == ctx.str()
7 if _ := ctx.value('') {
8 panic('This should never happen')
9 }
10}
11
12fn test_todo() {
13 ctx := todo()
14 assert '&context.TODO' == ctx.str()
15 if _ := ctx.value('') {
16 panic('This should never happen')
17 }
18}
19