mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 09:27:27 +00:00
Test that none of the macros are reparsed
This commit is contained in:
parent
9cf8d325a2
commit
fd5a1d1765
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue