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": test "=? can be used for optional binding":
if a =? int.none: if a =? int.none:
check false fail
if b =? 42.some: if b =? 42.some:
check b == 42 check b == 42
else: else:
check false fail
while a =? 42.some: while a =? 42.some:
check a == 42 check a == 42
break break
while a =? int.none: while a =? int.none:
check false fail
break break
test "=? can appear multiple times in conditional expression": test "=? can appear multiple times in conditional expression":
@ -67,7 +67,7 @@ suite "optionals":
check a == 42 check a == 42
check b == "foo" check b == "foo"
else: else:
check false fail
test "=? works with variable hiding": test "=? works with variable hiding":
let a = 42.some let a = 42.some

View File

@ -51,19 +51,19 @@ suite "result":
test "=? can be used for optional binding": test "=? can be used for optional binding":
if a =? int.failure(error): if a =? int.failure(error):
check false fail
if b =? 42.success: if b =? 42.success:
check b == 42 check b == 42
else: else:
check false fail
while a =? 42.success: while a =? 42.success:
check a == 42 check a == 42
break break
while a =? int.failure(error): while a =? int.failure(error):
check false fail
break break
test "=? can appear multiple times in conditional expression": test "=? can appear multiple times in conditional expression":
@ -71,7 +71,7 @@ suite "result":
check a == 42 check a == 42
check b == "foo" check b == "foo"
else: else:
check false fail
test "=? works with variable hiding": test "=? works with variable hiding":
let a = 42.success let a = 42.success