aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/gleam/bool_test.gleam8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/gleam/bool_test.gleam b/test/gleam/bool_test.gleam
index 964aab1..71359a7 100644
--- a/test/gleam/bool_test.gleam
+++ b/test/gleam/bool_test.gleam
@@ -169,13 +169,15 @@ pub fn guard_test() {
}
pub fn lazy_guard_test() {
+ let oops = fn() { panic as "this shouldn't run!" }
+
let assert 2 = {
- use <- bool.lazy_guard(when: True, return: fn() { 2 })
- 1
+ use <- bool.lazy_guard(when: True, otherwise: oops)
+ 2
}
let assert 1 = {
- use <- bool.lazy_guard(when: False, return: fn() { 2 })
+ use <- bool.lazy_guard(when: False, return: oops)
1
}
}