Macro feanor_math::assert_el_eq
source · macro_rules! assert_el_eq { ($ring:expr, $lhs:expr, $rhs:expr) => { ... }; }
Expand description
Equivalent to assert_eq! to assert that two ring elements are equal.
Frequently used in tests
§Example
assert_el_eq!(&StaticRing::<i32>::RING, &3, &3);
// is equivalent to
assert_eq!(3, 3);If the ring elements are not comparable on their own, this is really useful
// this does not have an equivalent representation with assert_eq!
assert_el_eq!(&BigIntRing::RING, &BigIntRing::RING.int_hom().map(3), &BigIntRing::RING.int_hom().map(3));