johannhof / difference.rs

Rust text diffing and assertion library
https://docs.rs/difference
MIT License
242 stars 33 forks source link

Replace the assert_diff fn with a macro #9

Closed paul-english closed 8 years ago

paul-english commented 8 years ago

Using a function for an assert means that any panic will show a line number for the crate rather than where it's used. By using a macro the panic is expanded in the test where it's used.

johannhof commented 8 years ago

Great, thanks 👍