1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

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
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')
}
}