Skip to content

Rust library to display assert panics in hexadecimal format

License

Notifications You must be signed in to change notification settings

wcampbell0x2a/assert_hex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

assert_hex

Latest Version Rust Documentation Crates.io

display expression using {:#x?} format when false assertion causes panic!().

Why

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.

Usage

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.

Changelog

See CHANGELOG.md

About

Rust library to display assert panics in hexadecimal format

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages