v / vlib / context
Raw file | 17 loc (15 sloc) | 303 bytes | Latest commit hash 3c8d2bbae
1module context
2
3fn test_background() {
4 ctx := background()
5 assert '&context.Background' == ctx.str()
6 if _ := ctx.value('') {
7 panic('This should never happen')
8 }
9}
10
11fn test_todo() {
12 ctx := todo()
13 assert '&context.TODO' == ctx.str()
14 if _ := ctx.value('') {
15 panic('This should never happen')
16 }
17}