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