From dc7fb3ba41fb942f9d29fd00bb2ff4415ff1252d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 21 Feb 2012 17:55:47 +0000 Subject: [PATCH] Fix comparisons in 'increases' and 'decreases' functions. The tests were the wrong way round. --- lib/whenutils.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 1.8.3.1