reorder func tests
This commit is contained in:
parent
7ed10668c6
commit
16051e15f2
@ -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>(
|
pub fn fmap_respects_identity<'a, T: Functor<'a> + Eqr<'a>, A: 'a + Send + Debug + PartialEq>(
|
||||||
fa0: impl Fn() -> T::F<A>,
|
fa0: impl Fn() -> T::F<A>,
|
||||||
) -> R {
|
) -> R {
|
||||||
@ -523,3 +492,34 @@ pub fn local_self_composes<
|
|||||||
T::join(ffa0()),
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user