mirror of
https://github.com/logos-storage/questionable.git
synced 2026-01-02 13:53:11 +00:00
Replace "check false" with "fail"
This commit is contained in:
parent
1d5a0222a7
commit
21927f3c88
@ -47,19 +47,19 @@ suite "optionals":
|
||||
|
||||
test "=? can be used for optional binding":
|
||||
if a =? int.none:
|
||||
check false
|
||||
fail
|
||||
|
||||
if b =? 42.some:
|
||||
check b == 42
|
||||
else:
|
||||
check false
|
||||
fail
|
||||
|
||||
while a =? 42.some:
|
||||
check a == 42
|
||||
break
|
||||
|
||||
while a =? int.none:
|
||||
check false
|
||||
fail
|
||||
break
|
||||
|
||||
test "=? can appear multiple times in conditional expression":
|
||||
@ -67,7 +67,7 @@ suite "optionals":
|
||||
check a == 42
|
||||
check b == "foo"
|
||||
else:
|
||||
check false
|
||||
fail
|
||||
|
||||
test "=? works with variable hiding":
|
||||
let a = 42.some
|
||||
|
||||
@ -51,19 +51,19 @@ suite "result":
|
||||
|
||||
test "=? can be used for optional binding":
|
||||
if a =? int.failure(error):
|
||||
check false
|
||||
fail
|
||||
|
||||
if b =? 42.success:
|
||||
check b == 42
|
||||
else:
|
||||
check false
|
||||
fail
|
||||
|
||||
while a =? 42.success:
|
||||
check a == 42
|
||||
break
|
||||
|
||||
while a =? int.failure(error):
|
||||
check false
|
||||
fail
|
||||
break
|
||||
|
||||
test "=? can appear multiple times in conditional expression":
|
||||
@ -71,7 +71,7 @@ suite "result":
|
||||
check a == 42
|
||||
check b == "foo"
|
||||
else:
|
||||
check false
|
||||
fail
|
||||
|
||||
test "=? works with variable hiding":
|
||||
let a = 42.success
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user