From 89a3aad3362e2d889292d88a4eeadeee3303e8da Mon Sep 17 00:00:00 2001 From: Jose Mendoza <56417208+StunxFS@users.noreply.github.com> Date: Mon, 20 Nov 2023 09:45:52 -0400 Subject: [PATCH] fix(tests): add missing `else` --- tests/valid/src/guard_expr.ri | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/valid/src/guard_expr.ri b/tests/valid/src/guard_expr.ri index 651159365..1e4d3d6aa 100644 --- a/tests/valid/src/guard_expr.ri +++ b/tests/valid/src/guard_expr.ri @@ -11,12 +11,16 @@ test "guard expression with mutable variable" { @assert(val == 3); val += 2; @assert(val == 5); + } else { + @assert(false); } } test "`if` expression with guard expression" { if val := ret_none() { @assert(val == 3); + } else { + @assert(false); } @assert(if val := ret_none() { @@ -37,6 +41,8 @@ test "`if` expression with guard expression" { if val := ret_err() { @assert(val == 3); + } else { + @assert(false); } } @@ -44,11 +50,15 @@ test "`while` expression with guard expression" { while val := ret_none() { @assert(val == 3); break; + } else { + @assert(false); } while val := ret_none(); val == 3 { @assert(val == 3); break; + } else { + @assert(false); } }