use super::*;
#[test]
fn div_one_by_constant_folds_to_reciprocal_literal() {
let result = reduce_expr(&Expr::div(Expr::f32(1.0), Expr::f32(4.0)));
assert_eq!(
result,
Some(Expr::f32(0.25)),
"Div(1.0, 4.0) must fold to LitF32(0.25)"
);
}
#[test]
fn div_one_by_zero_does_not_fold() {
let result = reduce_expr(&Expr::div(Expr::f32(1.0), Expr::f32(0.0)));
assert!(
result.is_none(),
"Div(1.0, 0.0) must NOT fold - div-by-zero is a trap"
);
}