Crates.io | assert_hex |
lib.rs | assert_hex |
version | 0.4.1 |
source | src |
created_at | 2020-03-09 20:41:28.099108 |
updated_at | 2023-09-17 14:48:41.862892 |
description | display assert panics in hexadecimal {:#x?} format |
homepage | |
repository | https://github.com/wcampbell0x2a/assert_hex |
max_upload_size | |
id | 216975 |
size | 10,303 |
display expression using {:#x?}
format when false assertion causes panic!()
.
Writing and testing protocol level libraries requires many tests to be written
with respect to byte level protocol sections in hex. This library simplifies the process
of viewing the differences between these types when tests fail by displaying by using the
{:#x?}
representation.
Compiler support: requires rustc 1.39+
$ cargo add assert_hex
Replace assert_eq
or assert_ne
with assert_eq_hex
or assert_ne_hex
respectively.
See CHANGELOG.md