frondeus / frondeus/test-case

Does not fully work with `pretty_assertions`, fix OK?

Open
#109 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
633
Forks
42
PR merge metrics
No merged PRs in 30d

Description

Hoi,

If one uses `assert_eq!` or `assert_ne!` macros inside closures defined inside a `#[test_case(...)]`, the drop-in replacement method provided by the [pretty_assertions](https://crates.io/crates/pretty_assertions) won't work, as the compilation fails on ambiguous resolution of those from [`use super::*` here](https://github.com/frondeus/test-case/blob/29db36051476164372130c5589b3b18fd4ac9a64/crates/test-case-macros/src/lib.rs#L91) and the `::std` provided one.

The solution would be to simply add a feature-guarded `use ::pretty_assertions::{assert_eq, assert_ne}` after the line above. Would not need `test_case` to depend on `pretty_assertions` even.

Would you accept a PR for that?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.