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