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:
committed by
GitHub
parent
44902b5aba
commit
3c8d2bbaec
@@ -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')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user