wrong.rs 512 B

1234567891011121314
  1. macro_rules! twoway {
  2. ($val:literal => $name:ident) => {
  3. #[test]
  4. fn $name() {
  5. let src_right = include_str!(concat!("./wrong/", $val, ".rsx"));
  6. let src_wrong = include_str!(concat!("./wrong/", $val, ".wrong.rsx"));
  7. let formatted = dioxus_autofmt::fmt_file(src_wrong);
  8. let out = dioxus_autofmt::apply_formats(src_wrong, formatted);
  9. pretty_assertions::assert_eq!(&src_right, &out);
  10. }
  11. };
  12. }
  13. twoway!("comments" => comments);