rust-analyzer / expect-test

Minimalistic snapshot testing for Rust.
Apache License 2.0
248 stars 22 forks source link

Unify expect! and expect_file! types #49

Open cpud36 opened 3 weeks ago

cpud36 commented 3 weeks ago

I want to use check pattern, but allow the user to select, whether to use inline expect! macro and the outline expect_file! macro. But these return different types: Expect, and ExpectFile respectively. Would you mind merging this into a common api?

E.g.

// Maybe rename these to `Expect`, `ExpectInline` and `ExpectFile` respectively
pub enum ExpectAny {
    Inline(Expect),
    File(ExpectFile),
}