vlib/context: some clean up and more readable examples (#9868)

This commit is contained in:
Ulises Jeremias Cornejo Fandos 2021-04-25 06:04:07 -07:00 committed by GitHub
parent 44902b5aba
commit 3c8d2bbaec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 65 deletions

View file

@ -4,8 +4,7 @@ fn test_background() {
ctx := background()
assert 'context.Background' == ctx.str()
if _ := ctx.value('') {
println('This should not happen')
assert false
panic('This should never happen')
}
}
@ -13,7 +12,6 @@ fn test_todo() {
ctx := todo()
assert 'context.TODO' == ctx.str()
if _ := ctx.value('') {
println('This should not happen')
assert false
panic('This should never happen')
}
}