You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think instead of having insta tests in lib.rs, the macro should test things by having files in tests/, which get run with the macro, and alsohave atests/insta_runner.rs` that runs the test files through the macro and generates insta snapshots.
The text was updated successfully, but these errors were encountered:
All macro insta tests become tests/foo.rs, and are compiled (but have no run behavior)
Macro gets tests/snapshots.rs that iterates all other tests and insta-snapshots their codegen
feature_tests and examples get an additional gen pass that iterates each file and codegens it into macro_expanded/ or something. These files just exist and are not expected to compile (we don't hook them up to a Cargo.toml or anything, since the feature_test crate compilation already tests this end-to-end)
I think this would be particularly useful for other people hacking on Diplomat, and of course makes it easier to review macro changes. So far we basically haven't touched the macro much, but I've also found myself afraid of touching the macro because I don't want to subtly break FFI. having more checked in generated stuff would greatly help.
I think instead of having insta tests in lib.rs, the macro should test things by having files in
tests/
, which get run with the macro, and alsohave a
tests/insta_runner.rs` that runs the test files through the macro and generates insta snapshots.The text was updated successfully, but these errors were encountered: