Skip to content

Commit

Permalink
Add tests for errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
tadd committed Jul 21, 2024
1 parent cb54fa2 commit cafce30
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test_lisp.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,7 @@ Test(lisp, set) {
v = eval_string("(define x 1) (set! x 42) x");
cr_assert(value_is_int(v));
cr_assert_eq(42, value_to_int(v));

v = eval_string("(set! x 42) x");
assert_runtime_error(v, "unbound variable x");
}

0 comments on commit cafce30

Please sign in to comment.