Debian Codegraph @

third_party/rust/failspot/README.md

raw
1 # failspot
2
3 [![crates.io](https://img.shields.io/crates/v/failspot?style=for-the-badge&logo=rust)](https://crates.io/crates/failspot)
4 [![docs.rs](https://img.shields.io/docsrs/failspot?style=for-the-badge&logo=docs.rs&label=docs.rs)](https://docs.rs/failspot)
5 ![license](https://img.shields.io/crates/l/failspot?style=for-the-badge)
6
7 A testing library that makes it easy(ish) to add intentional errors to a program
8
9 When testing error-handling codepaths, it is often useful to programmatically tell parts of the code to fail. This
10 crate provides the `failspot!()` macro, which can be used to mark a spot in the codepath where an intentional failure
11 can be toggled on and off from testing code.