@@ -4,16 +4,16 @@ use ra_db::SourceDatabaseExt;
44
55use super :: * ;
66
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 ) ;
99 let krate = db. test_crate ( ) ;
1010 {
1111 let events = db. log_executed ( || {
1212 db. crate_def_map ( krate) ;
1313 } ) ;
1414 assert ! ( format!( "{:?}" , events) . contains( "crate_def_map" ) , "{:#?}" , events)
1515 }
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 ( ) ) ) ;
1717
1818 {
1919 let events = db. log_executed ( || {
@@ -26,7 +26,7 @@ fn check_def_map_is_not_recomputed(initial: &str, file_change: &str) {
2626#[ test]
2727fn typing_inside_a_function_should_not_invalidate_def_map ( ) {
2828 check_def_map_is_not_recomputed (
29- "
29+ r "
3030 //- /lib.rs
3131 mod foo;<|>
3232
@@ -41,7 +41,7 @@ fn typing_inside_a_function_should_not_invalidate_def_map() {
4141 //- /foo/bar.rs
4242 pub struct Baz;
4343 " ,
44- "
44+ r "
4545 mod foo;
4646
4747 use crate::foo::bar::Baz;
@@ -54,7 +54,7 @@ fn typing_inside_a_function_should_not_invalidate_def_map() {
5454#[ test]
5555fn adding_inner_items_should_not_invalidate_def_map ( ) {
5656 check_def_map_is_not_recomputed (
57- "
57+ r "
5858 //- /lib.rs
5959 struct S { a: i32}
6060 enum E { A }
@@ -72,7 +72,7 @@ fn adding_inner_items_should_not_invalidate_def_map() {
7272 //- /foo/bar.rs
7373 pub struct Baz;
7474 " ,
75- "
75+ r "
7676 struct S { a: i32, b: () }
7777 enum E { A, B }
7878 trait T {
@@ -92,7 +92,7 @@ fn adding_inner_items_should_not_invalidate_def_map() {
9292#[ test]
9393fn typing_inside_a_macro_should_not_invalidate_def_map ( ) {
9494 let ( mut db, pos) = TestDB :: with_position (
95- "
95+ r "
9696 //- /lib.rs
9797 macro_rules! m {
9898 ($ident:ident) => {
0 commit comments