mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-28 18:43:01 +00:00
Fix tests
This commit is contained in:
parent
d8a6aaef96
commit
17d848a1bb
2 changed files with 10 additions and 10 deletions
|
|
@ -348,7 +348,7 @@ m!(Z);
|
|||
assert_eq!(module_data.scope.resolutions().count(), 4);
|
||||
});
|
||||
let n_recalculated_item_trees =
|
||||
events.iter().filter(|it| it.contains("file_item_tree_shim")).count();
|
||||
events.iter().filter(|it| it.contains("file_item_tree_query")).count();
|
||||
assert_eq!(n_recalculated_item_trees, 6);
|
||||
let n_reparsed_macros =
|
||||
events.iter().filter(|it| it.contains("parse_macro_expansion_shim")).count();
|
||||
|
|
@ -370,7 +370,7 @@ m!(Z);
|
|||
assert_eq!(module_data.scope.resolutions().count(), 4);
|
||||
});
|
||||
let n_recalculated_item_trees =
|
||||
events.iter().filter(|it| it.contains("file_item_tree_shim")).count();
|
||||
events.iter().filter(|it| it.contains("file_item_tree_query")).count();
|
||||
assert_eq!(n_recalculated_item_trees, 1, "{events:#?}");
|
||||
let n_reparsed_macros =
|
||||
events.iter().filter(|it| it.contains("parse_macro_expansion_shim")).count();
|
||||
|
|
@ -405,10 +405,10 @@ pub type Ty = ();
|
|||
db.file_item_tree(pos.file_id.into());
|
||||
});
|
||||
let n_calculated_item_trees =
|
||||
events.iter().filter(|it| it.contains("file_item_tree_shim")).count();
|
||||
assert_eq!(n_calculated_item_trees, 1);
|
||||
events.iter().filter(|it| it.contains("file_item_tree_query")).count();
|
||||
assert_eq!(n_calculated_item_trees, 1, "{events:#?}");
|
||||
let n_parsed_files = events.iter().filter(|it| it.contains("parse")).count();
|
||||
assert_eq!(n_parsed_files, 1);
|
||||
assert_eq!(n_parsed_files, 1, "{events:#?}");
|
||||
}
|
||||
|
||||
// FIXME(salsa-transition): bring this back
|
||||
|
|
@ -446,6 +446,6 @@ pub type Ty = ();
|
|||
}
|
||||
});
|
||||
let n_reparsed_files = events.iter().filter(|it| it.contains("parse(")).count();
|
||||
assert_eq!(n_reparsed_files, 0);
|
||||
assert_eq!(n_reparsed_files, 0, "{events:?}");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ pub struct NewStruct {
|
|||
let expected = vec![
|
||||
"parse_shim".to_owned(),
|
||||
"ast_id_map_shim".to_owned(),
|
||||
"file_item_tree_shim".to_owned(),
|
||||
"file_item_tree_query".to_owned(),
|
||||
"real_span_map_shim".to_owned(),
|
||||
"crate_local_def_map".to_owned(),
|
||||
"trait_impls_in_crate_shim".to_owned(),
|
||||
|
|
@ -216,7 +216,7 @@ pub enum SomeEnum {
|
|||
let expected = vec![
|
||||
"parse_shim".to_owned(),
|
||||
"ast_id_map_shim".to_owned(),
|
||||
"file_item_tree_shim".to_owned(),
|
||||
"file_item_tree_query".to_owned(),
|
||||
"real_span_map_shim".to_owned(),
|
||||
"crate_local_def_map".to_owned(),
|
||||
"trait_impls_in_crate_shim".to_owned(),
|
||||
|
|
@ -273,7 +273,7 @@ fn bar() -> f32 {
|
|||
let expected = vec![
|
||||
"parse_shim".to_owned(),
|
||||
"ast_id_map_shim".to_owned(),
|
||||
"file_item_tree_shim".to_owned(),
|
||||
"file_item_tree_query".to_owned(),
|
||||
"real_span_map_shim".to_owned(),
|
||||
"crate_local_def_map".to_owned(),
|
||||
"trait_impls_in_crate_shim".to_owned(),
|
||||
|
|
@ -342,7 +342,7 @@ impl SomeStruct {
|
|||
let expected = vec![
|
||||
"parse_shim".to_owned(),
|
||||
"ast_id_map_shim".to_owned(),
|
||||
"file_item_tree_shim".to_owned(),
|
||||
"file_item_tree_query".to_owned(),
|
||||
"real_span_map_shim".to_owned(),
|
||||
"crate_local_def_map".to_owned(),
|
||||
"trait_impls_in_crate_shim".to_owned(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue