mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
fix test naming
This commit is contained in:
parent
8f93e7b9a4
commit
bcb6fabd15
@ -348,6 +348,34 @@ fn check_item_map_is_not_recomputed(initial: &str, file_change: &str) {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn typing_inside_a_function_should_not_invalidate_item_map() {
|
fn typing_inside_a_function_should_not_invalidate_item_map() {
|
||||||
|
check_item_map_is_not_recomputed(
|
||||||
|
"
|
||||||
|
//- /lib.rs
|
||||||
|
mod foo;<|>
|
||||||
|
|
||||||
|
use crate::foo::bar::Baz;
|
||||||
|
|
||||||
|
fn foo() -> i32 {
|
||||||
|
1 + 1
|
||||||
|
}
|
||||||
|
//- /foo/mod.rs
|
||||||
|
pub mod bar;
|
||||||
|
|
||||||
|
//- /foo/bar.rs
|
||||||
|
pub struct Baz;
|
||||||
|
",
|
||||||
|
"
|
||||||
|
mod foo;
|
||||||
|
|
||||||
|
use crate::foo::bar::Baz;
|
||||||
|
|
||||||
|
fn foo() -> i32 { 92 }
|
||||||
|
",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn typing_inside_a_function_inside_a_macro_should_not_invalidate_item_map() {
|
||||||
check_item_map_is_not_recomputed(
|
check_item_map_is_not_recomputed(
|
||||||
"
|
"
|
||||||
//- /lib.rs
|
//- /lib.rs
|
||||||
@ -375,31 +403,3 @@ fn typing_inside_a_function_should_not_invalidate_item_map() {
|
|||||||
",
|
",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn typing_inside_a_function_inside_a_macro_should_not_invalidate_item_map() {
|
|
||||||
check_item_map_is_not_recomputed(
|
|
||||||
"
|
|
||||||
//- /lib.rs
|
|
||||||
mod foo;<|>
|
|
||||||
|
|
||||||
use crate::foo::bar::Baz;
|
|
||||||
|
|
||||||
fn foo() -> i32 {
|
|
||||||
1 + 1
|
|
||||||
}
|
|
||||||
//- /foo/mod.rs
|
|
||||||
pub mod bar;
|
|
||||||
|
|
||||||
//- /foo/bar.rs
|
|
||||||
pub struct Baz;
|
|
||||||
",
|
|
||||||
"
|
|
||||||
mod foo;
|
|
||||||
|
|
||||||
use crate::foo::bar::Baz;
|
|
||||||
|
|
||||||
fn foo() -> i32 { 92 }
|
|
||||||
",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user