summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index b095279..34ccba8 100644
--- a/eval.c
+++ b/eval.c
@@ -858,6 +858,8 @@ static bool eval_expr(struct expr *expr, struct eval_state *state) {
}
}
+ assert(!*state->quit);
+
bool ret = expr->eval(expr, state);
if (time) {
@@ -871,6 +873,10 @@ static bool eval_expr(struct expr *expr, struct eval_state *state) {
++expr->successes;
}
+ assert(!expr->always_true || ret);
+ assert(!expr->always_false || !ret);
+ assert(!expr->never_returns || *state->quit);
+
return ret;
}