Test that none of the macros are reparsed

This commit is contained in:
Jonas Schievink 2021-05-09 16:04:34 +02:00
parent 9cf8d325a2
commit fd5a1d1765

View file

@ -137,6 +137,9 @@ m!(Z);
});
let n_recalculated_item_trees = events.iter().filter(|it| it.contains("item_tree")).count();
assert_eq!(n_recalculated_item_trees, 6);
let n_reparsed_macros =
events.iter().filter(|it| it.contains("parse_macro_expansion")).count();
assert_eq!(n_reparsed_macros, 3);
}
let new_text = r#"
@ -155,5 +158,8 @@ m!(Z);
});
let n_recalculated_item_trees = events.iter().filter(|it| it.contains("item_tree")).count();
assert_eq!(n_recalculated_item_trees, 1);
let n_reparsed_macros =
events.iter().filter(|it| it.contains("parse_macro_expansion")).count();
assert_eq!(n_reparsed_macros, 0);
}
}