diff options
author | Aleksey Kladov <[email protected]> | 2020-03-26 14:44:31 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-03-26 14:44:31 +0000 |
commit | b7aaefb5a4a44985dc80a502209ea3f08a543b90 (patch) | |
tree | cedbc35ee1c618d44265e67e557e225aa4885630 /crates/ra_hir_def/src/nameres/tests | |
parent | ece8fa81bbff7cad8da2e28fb810699ae4045a16 (diff) |
Minor incremental tests cleanup
Diffstat (limited to 'crates/ra_hir_def/src/nameres/tests')
-rw-r--r-- | crates/ra_hir_def/src/nameres/tests/incremental.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/ra_hir_def/src/nameres/tests/incremental.rs b/crates/ra_hir_def/src/nameres/tests/incremental.rs index 83f429c29..496fc6b08 100644 --- a/crates/ra_hir_def/src/nameres/tests/incremental.rs +++ b/crates/ra_hir_def/src/nameres/tests/incremental.rs | |||
@@ -4,8 +4,8 @@ use ra_db::SourceDatabaseExt; | |||
4 | 4 | ||
5 | use super::*; | 5 | use super::*; |
6 | 6 | ||
7 | fn check_def_map_is_not_recomputed(initial: &str, file_change: &str) { | 7 | fn check_def_map_is_not_recomputed(ra_fixture_initial: &str, ra_fixture_change: &str) { |
8 | let (mut db, pos) = TestDB::with_position(initial); | 8 | let (mut db, pos) = TestDB::with_position(ra_fixture_initial); |
9 | let krate = db.test_crate(); | 9 | let krate = db.test_crate(); |
10 | { | 10 | { |
11 | let events = db.log_executed(|| { | 11 | let events = db.log_executed(|| { |
@@ -13,7 +13,7 @@ fn check_def_map_is_not_recomputed(initial: &str, file_change: &str) { | |||
13 | }); | 13 | }); |
14 | assert!(format!("{:?}", events).contains("crate_def_map"), "{:#?}", events) | 14 | assert!(format!("{:?}", events).contains("crate_def_map"), "{:#?}", events) |
15 | } | 15 | } |
16 | db.set_file_text(pos.file_id, Arc::new(file_change.to_string())); | 16 | db.set_file_text(pos.file_id, Arc::new(ra_fixture_change.to_string())); |
17 | 17 | ||
18 | { | 18 | { |
19 | let events = db.log_executed(|| { | 19 | let events = db.log_executed(|| { |
@@ -26,7 +26,7 @@ fn check_def_map_is_not_recomputed(initial: &str, file_change: &str) { | |||
26 | #[test] | 26 | #[test] |
27 | fn typing_inside_a_function_should_not_invalidate_def_map() { | 27 | fn typing_inside_a_function_should_not_invalidate_def_map() { |
28 | check_def_map_is_not_recomputed( | 28 | check_def_map_is_not_recomputed( |
29 | " | 29 | r" |
30 | //- /lib.rs | 30 | //- /lib.rs |
31 | mod foo;<|> | 31 | mod foo;<|> |
32 | 32 | ||
@@ -41,7 +41,7 @@ fn typing_inside_a_function_should_not_invalidate_def_map() { | |||
41 | //- /foo/bar.rs | 41 | //- /foo/bar.rs |
42 | pub struct Baz; | 42 | pub struct Baz; |
43 | ", | 43 | ", |
44 | " | 44 | r" |
45 | mod foo; | 45 | mod foo; |
46 | 46 | ||
47 | use crate::foo::bar::Baz; | 47 | use crate::foo::bar::Baz; |
@@ -54,7 +54,7 @@ fn typing_inside_a_function_should_not_invalidate_def_map() { | |||
54 | #[test] | 54 | #[test] |
55 | fn adding_inner_items_should_not_invalidate_def_map() { | 55 | fn adding_inner_items_should_not_invalidate_def_map() { |
56 | check_def_map_is_not_recomputed( | 56 | check_def_map_is_not_recomputed( |
57 | " | 57 | r" |
58 | //- /lib.rs | 58 | //- /lib.rs |
59 | struct S { a: i32} | 59 | struct S { a: i32} |
60 | enum E { A } | 60 | enum E { A } |
@@ -72,7 +72,7 @@ fn adding_inner_items_should_not_invalidate_def_map() { | |||
72 | //- /foo/bar.rs | 72 | //- /foo/bar.rs |
73 | pub struct Baz; | 73 | pub struct Baz; |
74 | ", | 74 | ", |
75 | " | 75 | r" |
76 | struct S { a: i32, b: () } | 76 | struct S { a: i32, b: () } |
77 | enum E { A, B } | 77 | enum E { A, B } |
78 | trait T { | 78 | trait T { |
@@ -92,7 +92,7 @@ fn adding_inner_items_should_not_invalidate_def_map() { | |||
92 | #[test] | 92 | #[test] |
93 | fn typing_inside_a_macro_should_not_invalidate_def_map() { | 93 | fn typing_inside_a_macro_should_not_invalidate_def_map() { |
94 | let (mut db, pos) = TestDB::with_position( | 94 | let (mut db, pos) = TestDB::with_position( |
95 | " | 95 | r" |
96 | //- /lib.rs | 96 | //- /lib.rs |
97 | macro_rules! m { | 97 | macro_rules! m { |
98 | ($ident:ident) => { | 98 | ($ident:ident) => { |