eqr tests
All checks were successful
buildbot/cargo fmt (1.72) Build done.
buildbot/cargo clippy (1.72) Build done.
buildbot/cargo doc (1.72) Build done.
buildbot/cargo test (1.65) Build done.
buildbot/cargo clippy (1.65) Build done.

This commit is contained in:
AF 2023-10-15 16:19:44 +00:00
parent 4d668876eb
commit 23fbe93afe

View File

@ -417,3 +417,29 @@ pub fn select_of_equal_is_same<
fa0(),
)
}
#[test]
fn eqr_ok() {
eqr("test", 0, 0).unwrap();
}
#[test]
#[should_panic(expected = "test: 1 != 2")]
fn eqr_panic() {
eqr("test", 1, 2).unwrap();
}
#[test]
#[should_panic]
fn eqr_err_add() {
(R::default() + eqr("test", 1, 2) + eqr("test", 3, 4)).unwrap();
}
#[test]
#[should_panic]
fn eqr_err_add_assign() {
let mut r = R::default();
r += eqr("test", 1, 2);
r += eqr("test", 3, 4);
r.unwrap();
}