Crates.io | asserts-rs |
lib.rs | asserts-rs |
version | 0.3.0 |
source | src |
created_at | 2022-04-24 08:39:22.452949 |
updated_at | 2022-04-25 02:51:48.962296 |
description | Asserts utilliy macros for Rust |
homepage | https://github.com/CGQAQ/asserts-rs |
repository | https://github.com/CGQAQ/asserts-rs |
max_upload_size | |
id | 573014 |
size | 26,374 |
Assert utillities
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)
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)
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)
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)