From 75952ab5fd9541a30d1acabee7850e3547a74116 Mon Sep 17 00:00:00 2001 From: Lewis Van Winkle Date: Sat, 23 Jan 2016 12:13:53 -0600 Subject: [PATCH] Added test cases to insure te_compile returns 0 on error. --- test.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test.c b/test.c index 41bdb09..a341447 100644 --- a/test.c +++ b/test.c @@ -162,8 +162,13 @@ void test_syntax() { const int e = errors[i].answer; int err; - te_interp(expr, &err); + const double r = te_interp(expr, &err); lequal(err, e); + lok(r != r); + + te_expr *n = te_compile(expr, 0, 0, &err); + lequal(err, e); + lok(!n); } }