extend result error samples
This commit is contained in:
parent
f51c0d21fd
commit
45b3e6c2bf
@ -250,7 +250,7 @@ impl<'a, T: Monad<'a>> MonadFailAny<'a> for ResultFailOver<T> {
|
|||||||
mod result_tests {
|
mod result_tests {
|
||||||
use super::{test_suite, tests, ResultInstance};
|
use super::{test_suite, tests, ResultInstance};
|
||||||
|
|
||||||
type T = ResultInstance<bool>;
|
type T = ResultInstance<i32>;
|
||||||
|
|
||||||
impl<'a> tests::Eqr<'a> for T {
|
impl<'a> tests::Eqr<'a> for T {
|
||||||
fn eqr<A: 'a + Send + PartialEq + std::fmt::Debug>(
|
fn eqr<A: 'a + Send + PartialEq + std::fmt::Debug>(
|
||||||
@ -264,8 +264,10 @@ mod result_tests {
|
|||||||
|
|
||||||
impl<'a> test_suite::FunctorTestSuite<'a> for T {
|
impl<'a> test_suite::FunctorTestSuite<'a> for T {
|
||||||
fn sample<A: 'a + Send, F: FnMut(&'a (dyn Send + Sync + Fn(A) -> Self::F<A>))>(mut f: F) {
|
fn sample<A: 'a + Send, F: FnMut(&'a (dyn Send + Sync + Fn(A) -> Self::F<A>))>(mut f: F) {
|
||||||
f(&|_| Err(false));
|
f(&|_| Err(0));
|
||||||
f(&|_| Err(true));
|
f(&|_| Err(1));
|
||||||
|
f(&|_| Err(2));
|
||||||
|
f(&|_| Err(3));
|
||||||
f(&|a| Ok(a));
|
f(&|a| Ok(a));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user