From bcb6fabd15d2767c21b6a4f9d00389341ec6731e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 9 Jan 2019 00:49:21 +0300 Subject: [PATCH] fix test naming --- crates/ra_hir/src/nameres/tests.rs | 56 +++++++++++++++--------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/crates/ra_hir/src/nameres/tests.rs b/crates/ra_hir/src/nameres/tests.rs index ac96bea37c7..0e9026a0166 100644 --- a/crates/ra_hir/src/nameres/tests.rs +++ b/crates/ra_hir/src/nameres/tests.rs @@ -348,6 +348,34 @@ fn check_item_map_is_not_recomputed(initial: &str, file_change: &str) { #[test] 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( " //- /lib.rs @@ -375,31 +403,3 @@ fn foo() -> i32 { 92 } ", ); } - -#[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 } - ", - ); -}