From: Richard W.M. Jones Date: Tue, 21 Feb 2012 17:55:47 +0000 (+0000) Subject: Fix comparisons in 'increases' and 'decreases' functions. X-Git-Tag: 0.0.1~8 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=dc7fb3ba41fb942f9d29fd00bb2ff4415ff1252d;p=whenjobs.git Fix comparisons in 'increases' and 'decreases' functions. The tests were the wrong way round. --- diff --git a/lib/whenutils.ml b/lib/whenutils.ml index e43dcf6..2db4103 100644 --- a/lib/whenutils.ml +++ b/lib/whenutils.ml @@ -480,14 +480,14 @@ let rec eval_whenexpr job variables onload = function | Expr_increases v -> let prev_value, curr_value = get_prev_curr_value job variables v in - if compare_values prev_value curr_value > 0 then + if compare_values prev_value curr_value < 0 then T_bool true else T_bool false | Expr_decreases v -> let prev_value, curr_value = get_prev_curr_value job variables v in - if compare_values prev_value curr_value < 0 then + if compare_values prev_value curr_value > 0 then T_bool true else T_bool false