1 | module context |
2 | |
3 | fn test_background() { |
4 | ctx := background() |
5 | assert '&context.Background' == ctx.str() |
6 | if _ := ctx.value('') { |
7 | panic('This should never happen') |
8 | } |
9 | } |
10 | |
11 | fn test_todo() { |
12 | ctx := todo() |
13 | assert '&context.TODO' == ctx.str() |
14 | if _ := ctx.value('') { |
15 | panic('This should never happen') |
16 | } |
17 | } |