From b4abdded390b2f13298a7804127847230a2b9f08 Mon Sep 17 00:00:00 2001 From: PaddiM8 Date: Fri, 24 Sep 2021 14:32:18 +0200 Subject: [PATCH] Updated interpreter tests to expect 0 after comparisons --- kalk/src/interpreter.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kalk/src/interpreter.rs b/kalk/src/interpreter.rs index 4a86a85..e6a479b 100644 --- a/kalk/src/interpreter.rs +++ b/kalk/src/interpreter.rs @@ -558,37 +558,37 @@ mod tests { let result = interpret(equals).unwrap().unwrap(); assert_eq!( (result.to_f64(), result.boolean_value.unwrap()), - (3f64, false) + (0f64, false) ); let result = interpret(not_equals).unwrap().unwrap(); assert_eq!( (result.to_f64(), result.boolean_value.unwrap()), - (3f64, true) + (0f64, true) ); let result = interpret(greater_than).unwrap().unwrap(); assert_eq!( (result.to_f64(), result.boolean_value.unwrap()), - (3f64, false) + (0f64, false) ); let result = interpret(less_than).unwrap().unwrap(); assert_eq!( (result.to_f64(), result.boolean_value.unwrap()), - (3f64, true) + (0f64, true) ); let result = interpret(greater_or_equals).unwrap().unwrap(); assert_eq!( (result.to_f64(), result.boolean_value.unwrap()), - (3f64, false) + (0f64, false) ); let result = interpret(less_or_equals).unwrap().unwrap(); assert_eq!( (result.to_f64(), result.boolean_value.unwrap()), - (3f64, true) + (0f64, true) ); }