mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-21 15:59:20 +03:00
add test
This commit is contained in:
parent
2dab9c81d1
commit
95fbc15373
@ -406,7 +406,6 @@ fn fix_values_captured_in_closure_expr(
|
||||
}
|
||||
|
||||
Expect(condition, loc_expr) => {
|
||||
// LetNonRec(Box<Def>, Box<Located<Expr>>, Variable, Aliases),
|
||||
fix_values_captured_in_closure_expr(&mut condition.value, no_capture_symbols);
|
||||
fix_values_captured_in_closure_expr(&mut loc_expr.value, no_capture_symbols);
|
||||
}
|
||||
|
@ -4442,7 +4442,7 @@ fn run_low_level<'a, 'ctx, 'env>(
|
||||
IntPredicate::EQ,
|
||||
cond.into_int_value(),
|
||||
context.bool_type().const_int(1, false),
|
||||
"has_not_overflowed",
|
||||
"is_true",
|
||||
);
|
||||
|
||||
let then_block = context.append_basic_block(parent, "then_block");
|
||||
|
@ -2296,3 +2296,19 @@ fn call_invalid_layout() {
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic(expected = "assert failed!")]
|
||||
fn expect_fail() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
expect 1 == 2
|
||||
|
||||
3
|
||||
"#
|
||||
),
|
||||
3,
|
||||
i64
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user