assert-call

Crates.ioassert-call
lib.rsassert-call
version0.1.1
sourcesrc
created_at2024-02-12 08:53:51.62305
updated_at2024-02-15 09:35:22.44082
descriptionA tool for testing that ensures code parts are called as expected.
homepage
repositoryhttps://github.com/frozenlib/assert-call
max_upload_size
id1136619
size23,391
frozenlib (frozenlib)

documentation

https://docs.rs/assert-call/

README

asesrt-call

Crates.io Docs.rs Actions Status

A tool for testing that ensures code parts are called as expected.

Example

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

License

This project is dual licensed under Apache-2.0/MIT. See the two LICENSE-* files for details.

Contribution

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.

Commit count: 0

cargo fmt