use std::any::Any;
pub fn is_equal<A: Any + PartialEq<B>, B: Any>(a: &A, b: &B) {
if a != b {
panic!("r-unit catched: Parameter 1 is not equal to parameter 2")
}
}
pub fn is_not_equal<A: Any + PartialEq<B>, B: Any>(a: &A, b: &B) {
if a == b {
panic!("r-unit catched: Parameter 1 is equal to parameter 2")
}
}
pub fn is_less_than(a: &i32, b: &i32) {
if *a >= *b {
panic!("r-unit catched: Parameter 1: {} is greater than parameter 2: {}", *a, *b)
}
}
pub fn is_greater_than(a: &i32, b: &i32) {
if *a <= *b {
panic!("r-unit catched: Parameter 1: {} is less than parameter 2: {}", *a, *b)
}
}
pub fn is_negative(a: &i32) {
if *a > 0 {
panic!("r-unit catched: Parameter 1: {} is not negative", *a)
}
}
pub fn is_odd(a: &i32) {
if a % 2 == 0 {
panic!("r-unit catched: Parameter 1: {} is not odd", a)
}
}
pub fn is_even(a: &i32) {
if a % 2 == 1 {
panic!("r-unit catched: Parameter 1: {} is not even", a)
}
}