mac::test_eq! [] [src]

macro_rules! test_eq {
    ($name:ident, $left:expr, $right:expr) => {
        #[test]
        fn $name() {
            assert_eq!($left, $right);
        }
    }
}

Generate a test function $name which asserts that $left and $right are equal.

Example

mod test {
    test_eq!(two_and_two_is_four, 2 + 2, 4);
}