Macro assert_str_eq

Source
macro_rules! assert_str_eq {
    ($expect:expr, $actual:expr, $mes:literal) => { ... };
    ($expect:expr, $actual:expr $(,)?) => { ... };
}
Expand description

Checks that two strings are equal. If they are not equal, it will cause a compile-time error. And the message will be printed if it is provided.

§Example

extern crate axplat;
const A: &str = "hello";
const B: &str = "hello";
axplat::assert_str_eq!(A, B);
extern crate axplat;
const A: &str = "hello";
const B: &str = "world";
axplat::assert_str_eq!(A, B, "A and B are not equal!");