mirror of
https://github.com/PaddiM8/kalker.git
synced 2024-12-13 01:50:41 +01:00
Updated interpreter tests to expect 0 after comparisons
This commit is contained in:
parent
de78767529
commit
5a42ba0c91
@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user