mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
vlib/context: some clean up and more readable examples (#9868)
This commit is contained in:
parent
44902b5aba
commit
3c8d2bbaec
5 changed files with 20 additions and 65 deletions
|
@ -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')
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue