Macro assert_writeable_eq
macro_rules! assert_writeable_eq {
($actual_writeable:expr, $expected_str:expr $(,)?) => { ... };
($actual_writeable:expr, $expected_str:expr, $($arg:tt)+) => { ... };
(@internal, $actual_writeable:expr, $expected_str:expr, $($arg:tt)+) => { ... };
}
Testing macros for types implementing Writeable.
Arguments, in order:
- The
Writeableunder test - The expected string value
*_parts_eqonly: a list of parts ([(start, end, Part)])
Any remaining arguments get passed to format!
The macros tests the following:
- Equality of string content
- Equality of parts (
*_parts_eqonly) - Validity of size hint
Examples
# use Writeable;
# use LengthHint;
# use Part;
# use assert_writeable_eq;
# use assert_writeable_parts_eq;
# use ;
const WORD: Part = Part ;
;
impl_display_with_writeable!;
assert_writeable_eq!;
assert_writeable_eq!;
assert_writeable_parts_eq!;
assert_writeable_parts_eq!;