blob: 03a26e5a5b3d526a31ae08342fc8c4f7f2e131c2 [file] [log] [blame]
// vim: tw=80
#![deny(warnings)]
use mockall::*;
mock! {
pub MyIter {}
impl Iterator for MyIter {
type Item=u32;
fn next(&mut self) -> Option<u32>;
}
}
#[test]
fn return_const() {
let mut mock = MockMyIter::new();
mock.expect_next()
.return_const(None);
assert!(mock.next().is_none());
}