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

This commit is contained in:
AF 2024-08-30 21:31:15 +00:00
parent 7ed10668c6
commit 16051e15f2
Signed by: alisa
SSH Key Fingerprint: SHA256:vNY4pdIZvO1FYJKHROkdHLtvyopizvZVAEwg9AF6h04

View File

@ -113,37 +113,6 @@ impl AddAssign<R> for R {
}
}
#[cfg(test)]
mod eqr_tests {
use super::{eqr, R};
#[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();
}
}
pub fn fmap_respects_identity<'a, T: Functor<'a> + Eqr<'a>, A: 'a + Send + Debug + PartialEq>(
fa0: impl Fn() -> T::F<A>,
) -> R {
@ -523,3 +492,34 @@ pub fn local_self_composes<
T::join(ffa0()),
)
}
#[cfg(test)]
mod eqr_tests {
use super::{eqr, R};
#[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();
}
}