Struct test_casing::TestCases
source · pub struct TestCases<T> { /* private fields */ }
Expand description
Container for test cases based on a lazily evaluated iterator. Should be constructed
using the cases!
macro.
§Examples
const NUMBER_CASES: TestCases<u32> = cases!([2, 3, 5, 8]);
const MORE_CASES: TestCases<u32> = cases! {
NUMBER_CASES.into_iter().chain([42, 555])
};
// The `cases!` macro can wrap a statement block:
const COMPLEX_CASES: TestCases<u32> = cases!({
use rand::{rngs::StdRng, Rng, SeedableRng};
let mut rng = StdRng::seed_from_u64(123);
(0..5).map(move |_| rng.gen())
});
Implementations§
Trait Implementations§
source§impl<T> IntoIterator for TestCases<T>
impl<T> IntoIterator for TestCases<T>
impl<T> Copy for TestCases<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for TestCases<T>
impl<T> Send for TestCases<T>
impl<T> Sync for TestCases<T>
impl<T> Unpin for TestCases<T>
impl<T> UnwindSafe for TestCases<T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more