Sign in
fuchsia
/
fuchsia
/
eb50e07bc90baedf041d7def6479a9b91f880d73
/
.
/
third_party
/
rust_crates
/
vendor
/
mockall
/
tests
/
mock_static_method_with_reference_arguments.rs
blob: 1785ddc2e81cf1464972e620c8b4f14326723d1d [
file
] [
log
] [
blame
]
// vim: tw=80
#![
deny
(
warnings
)]
use
mockall
::*;
mock
!{
Foo
{
fn
bar
(
x
:
&
u32
)
->
u64
;
}
}
#[
test
]
fn
with
()
{
let
ctx
=
MockFoo
::
bar_context
();
ctx
.
expect
()
.
with
(
predicate
::
eq
(
42
))
.
return_const
(
99u64
);
assert_eq
!(
99
,
MockFoo
::
bar
(&
42
));
}