ebkalderon / tower-lsp

Language Server Protocol implementation written in Rust
Apache License 2.0
962 stars 54 forks source link

Add assert_err! macro to simplify codec.rs unit tests #320

Closed ebkalderon closed 2 years ago

ebkalderon commented 2 years ago

Changed

For context, both of these approaches are superior to using assert!(matches!(_, _)) because it prints the actual value in the cargo test error message if the assertion fails. This new macro simply hides the boilerplate away.