asserts-rs 0.3.0

Asserts utilliy macros for Rust
Documentation
  • Coverage
  • 80%
    8 out of 10 items documented8 out of 8 items with examples
  • Size
  • Source code size: 26.06 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.35 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • CGQAQ/asserts-rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CGQAQ

asserts-rs

Assert utillities

Utility macros

asserts_eq/assertsd_eq

use asserts_rs::*;
asserts_eq!(1, 1); //OK
asserts_eq!(1, 1, 1); // OK
asserts_eq!(1, 1, 1, 2); // panic 1 not equal to 2
assertsd_eq!(1, 1, 1, 2); // panic 1 not equal to 2(only in debug mode)

asserts_ne/assertsd_ne

use asserts_rs::*;
asserts_ne!(1, 2); //OK
asserts_ne!(1, 2, 3); // OK
asserts_ne!(1, 2, 1, 3); // panic 1 equal to 1
assertsd_ne!(1, 2, 1, 3); // panic 1 equal to 1(only in debug mode)

asserts_eq_one_of/assertsd_eq_one_of

use asserts_rs::*;
asserts_eq_one_of!(1, 1); //OK
asserts_eq_one_of!(1, 1, 2); // OK
asserts_eq_one_of!(1, 2, 3); // panic 1 is not equals to any of numbers in (2, 3)s
assertsd_eq_one_of!(1, 2, 3); // panic 1 is not equals to any of numbers in (2, 3)s(only in debug mode)

asserts_ne_one_of/assertsd_ne_one_of

use asserts_rs::*;
asserts_ne_one_of!(1, 2); //OK
asserts_ne_one_of!(1, 2, 3); // OK
asserts_ne_one_of!(1, 1, 1); // panic 1 is equals to all of numbers in (1, 1)
assertsd_ne_one_of!(1, 1, 1); // panic 1 is equals to all of numbers in (1, 1)(only in debug mode)