Replace "check false" with "fail"

This commit is contained in:
Mark Spanbroek 2021-03-13 11:54:03 +01:00
parent 1d5a0222a7
commit 21927f3c88
2 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -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