fix division by zero error detect

This commit is contained in:
collin 2020-08-03 15:21:41 -07:00
parent 4565274893
commit 95984c98c9

View File

@ -119,7 +119,7 @@ macro_rules! test_int {
let mut program = parse_program(bytes).unwrap();
// expect an error when dividing by zero
if b == 0 || b == <$type_>::MIN {
if b == 0 || b == <$type_>::MIN || a == <$type_>::MIN {
let main_input = generate_main_input(vec![
("a", Some(InputValue::Integer($integer_type, a.to_string()))),
("b", Some(InputValue::Integer($integer_type, b.to_string()))),