1. Only showing results from lib.rs

    Clear filter to show all search results

  2. Aug 27, 2024Related: assert2-macros See also: assertor, test-case, mockall, googletest, ntest, assertables, claims, more-asserts, assert_float_eq, rusty-fork, pretty_assertions Lib.rs is an unofficial list of Rust/Cargo crates, created by kornelski.It contains data from multiple sources, including heuristics, and manually curated data.Content of this page is not necessarily endorsed by the authors of the ...
  3. Dec 7, 2024assert_gt_as_result!(1, 2) ≈ Result Err; debug_assert_gt!(a, b) ≈ panic in debug mode; Many of the macros have a form "compare left item to right item" that compares items of the same kind, and a form "compare left item to right expression" that compares one item to any arbitrary expression: assert_len_eq!(a, b) ≈ a.len() = b.len() assert ...
  4. Dec 2, 2024Each of the assert_* macros also comes in an expect_* variant, which returns a Result indicating if the comparison was successful. Documentation. assert_float_eq's documentation can be found on docs.rs. License. assert_float_eq is dual licensed under the Apache 2.0 license as well as the MIT license.
  5. 429,259 downloads per month Used in 531 crates (124 directly). Unlicense OR MIT OR Apache-2… 17KB 229 lines. More Asserts (for Rust).. Small library providing assertion macros similar to the {debug_,}assert_{eq,ne} macros in the stdlib.. Usage use more_asserts as ma; #[derive(Debug, PartialEq, PartialOrd)] enum Example {Foo, Bar } ma::assert_le!(3, 4); ma::assert_ge!(10, 10, "You can pass a ...
  6. Jan 23, 2024Recoverable assertions, inspired by the use of assert() in SQLite. never! and always! return the actual value of the condition if debug_assertions are disabled. Use them when terminating on assertion failure is worse than continuing. One example would be a critical application like a database:
  7. Jan 25, 2025#[test] fn test_hello_world() {insta::assert_debug_snapshot!(vec![1, 2, 3]);} Curious? There is a screencast that shows the entire workflow: watch the insta introduction screencast. Or if you're not into videos, read the 5 minute introduction. Insta also supports inline snapshots which are stored right in your source file instead of separate files.
  8. assert_let_bind. A convenience macro for writing pattern-matching tests in the Rust programming language. The assert_let macro tests whether a value matches a given pattern, binding the pattern in the current scope if the match succeeds and causing a panic if the match fails. (Strongly inspired by assert_matches)
  9. See also: assert_fs, assert2, environmental, modenv, more-asserts, assertables, always-assert, snapbox, assert_matches2, dotenvy, envy Lib.rs is an unofficial list of Rust/Cargo crates, created by kornelski.It contains data from multiple sources, including heuristics, and manually curated data.Content of this page is not necessarily endorsed by the authors of the crate.

    Can’t find what you’re looking for?

    Help us improve DuckDuckGo searches with your feedback

Custom date rangeX