@@ -4,16 +4,16 @@ use ra_db::SourceDatabaseExt;
4
4
5
5
use super :: * ;
6
6
7
- fn check_def_map_is_not_recomputed ( initial : & str , file_change : & str ) {
8
- let ( mut db, pos) = TestDB :: with_position ( initial ) ;
7
+ fn check_def_map_is_not_recomputed ( ra_fixture_initial : & str , ra_fixture_change : & str ) {
8
+ let ( mut db, pos) = TestDB :: with_position ( ra_fixture_initial ) ;
9
9
let krate = db. test_crate ( ) ;
10
10
{
11
11
let events = db. log_executed ( || {
12
12
db. crate_def_map ( krate) ;
13
13
} ) ;
14
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
19
let events = db. log_executed ( || {
@@ -26,7 +26,7 @@ fn check_def_map_is_not_recomputed(initial: &str, file_change: &str) {
26
26
#[ test]
27
27
fn typing_inside_a_function_should_not_invalidate_def_map ( ) {
28
28
check_def_map_is_not_recomputed (
29
- "
29
+ r "
30
30
//- /lib.rs
31
31
mod foo;<|>
32
32
@@ -41,7 +41,7 @@ fn typing_inside_a_function_should_not_invalidate_def_map() {
41
41
//- /foo/bar.rs
42
42
pub struct Baz;
43
43
" ,
44
- "
44
+ r "
45
45
mod foo;
46
46
47
47
use crate::foo::bar::Baz;
@@ -54,7 +54,7 @@ fn typing_inside_a_function_should_not_invalidate_def_map() {
54
54
#[ test]
55
55
fn adding_inner_items_should_not_invalidate_def_map ( ) {
56
56
check_def_map_is_not_recomputed (
57
- "
57
+ r "
58
58
//- /lib.rs
59
59
struct S { a: i32}
60
60
enum E { A }
@@ -72,7 +72,7 @@ fn adding_inner_items_should_not_invalidate_def_map() {
72
72
//- /foo/bar.rs
73
73
pub struct Baz;
74
74
" ,
75
- "
75
+ r "
76
76
struct S { a: i32, b: () }
77
77
enum E { A, B }
78
78
trait T {
@@ -92,7 +92,7 @@ fn adding_inner_items_should_not_invalidate_def_map() {
92
92
#[ test]
93
93
fn typing_inside_a_macro_should_not_invalidate_def_map ( ) {
94
94
let ( mut db, pos) = TestDB :: with_position (
95
- "
95
+ r "
96
96
//- /lib.rs
97
97
macro_rules! m {
98
98
($ident:ident) => {
0 commit comments