summaryrefslogtreecommitdiff
path: root/macros/src/expectation.rs
diff options
context:
space:
mode:
Diffstat (limited to 'macros/src/expectation.rs')
-rw-r--r--macros/src/expectation.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/macros/src/expectation.rs b/macros/src/expectation.rs
index a6d181f..4095278 100644
--- a/macros/src/expectation.rs
+++ b/macros/src/expectation.rs
@@ -402,6 +402,22 @@ impl ToTokens for Expectation
}
}
+ impl #boundless_impl_generics #ident #ty_generics {
+ fn is_exhausted(&self) -> bool {
+ if let ::ridicule::__private::CallCountExpectation::Times(times) =
+ self.call_cnt_expectation
+ {
+ if times == self.call_cnt.load(
+ ::std::sync::atomic::Ordering::Relaxed
+ ) {
+ return true;
+ }
+ }
+
+ false
+ }
+ }
+
impl #boundless_impl_generics Drop for #ident #ty_generics
{
fn drop(&mut self) {