| Crates.io | assert-call |
| lib.rs | assert-call |
| version | 0.1.2 |
| created_at | 2024-02-12 08:53:51.62305+00 |
| updated_at | 2025-03-07 23:30:39.85864+00 |
| description | A tool for testing that ensures code parts are called as expected. |
| homepage | |
| repository | https://github.com/frozenlib/assert-call |
| max_upload_size | |
| id | 1136619 |
| size | 50,066 |
A tool for testing that ensures code parts are called as expected.
use assert_call::{call, CallRecorder};
let mut c = CallRecorder::new();
call!("1");
call!("2");
c.verify(["1", "3"]);
The above code panics and outputs the following message because the call to call!() is different from what is specified in verity().
actual calls :
1
* 2
(end)
mismatch call
src\lib.rs:10
actual : 2
expect : 3
This project is dual licensed under Apache-2.0/MIT. See the two LICENSE-* files for details.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.