diff options
author | Phil Ellison <[email protected]> | 2019-07-28 10:42:31 +0100 |
---|---|---|
committer | Phil Ellison <[email protected]> | 2019-07-28 10:42:31 +0100 |
commit | 164ba6092c41fe9b4ecd5bedb5d3d6d849c51639 (patch) | |
tree | 94ea6ad881a0b5270742080da27893d4fe8ceb58 | |
parent | 3e086528efd950e3051654daf9e62f339ef4a55c (diff) |
Remove unused highlights_code_inside_macro snapshot, inline rename_mod_in_dir snapshot
3 files changed, 33 insertions, 83 deletions
diff --git a/crates/ra_ide_api/src/references.rs b/crates/ra_ide_api/src/references.rs index 5c74d3e36..a75a0eb4f 100644 --- a/crates/ra_ide_api/src/references.rs +++ b/crates/ra_ide_api/src/references.rs | |||
@@ -356,7 +356,39 @@ mod tests { | |||
356 | ); | 356 | ); |
357 | let new_name = "foo2"; | 357 | let new_name = "foo2"; |
358 | let source_change = analysis.rename(position, new_name).unwrap(); | 358 | let source_change = analysis.rename(position, new_name).unwrap(); |
359 | assert_debug_snapshot_matches!("rename_mod_in_dir", &source_change); | 359 | assert_debug_snapshot_matches!(&source_change, |
360 | @r#"Some( | ||
361 | SourceChange { | ||
362 | label: "rename", | ||
363 | source_file_edits: [ | ||
364 | SourceFileEdit { | ||
365 | file_id: FileId( | ||
366 | 1, | ||
367 | ), | ||
368 | edit: TextEdit { | ||
369 | atoms: [ | ||
370 | AtomTextEdit { | ||
371 | delete: [4; 7), | ||
372 | insert: "foo2", | ||
373 | }, | ||
374 | ], | ||
375 | }, | ||
376 | }, | ||
377 | ], | ||
378 | file_system_edits: [ | ||
379 | MoveFile { | ||
380 | src: FileId( | ||
381 | 2, | ||
382 | ), | ||
383 | dst_source_root: SourceRootId( | ||
384 | 0, | ||
385 | ), | ||
386 | dst_path: "foo2/mod.rs", | ||
387 | }, | ||
388 | ], | ||
389 | cursor_position: None, | ||
390 | }, | ||
391 | )"#); | ||
360 | } | 392 | } |
361 | 393 | ||
362 | fn test_rename(text: &str, new_name: &str, expected: &str) { | 394 | fn test_rename(text: &str, new_name: &str, expected: &str) { |
diff --git a/crates/ra_ide_api/src/snapshots/tests__highlights_code_inside_macros.snap b/crates/ra_ide_api/src/snapshots/tests__highlights_code_inside_macros.snap deleted file mode 100644 index ae8923e75..000000000 --- a/crates/ra_ide_api/src/snapshots/tests__highlights_code_inside_macros.snap +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-02-01T07:46:59.130146403+00:00" | ||
3 | creator: [email protected] | ||
4 | expression: "&highlights" | ||
5 | source: crates/ra_ide_api/src/syntax_highlighting.rs | ||
6 | --- | ||
7 | [ | ||
8 | HighlightedRange { | ||
9 | range: [13; 15), | ||
10 | tag: "keyword" | ||
11 | }, | ||
12 | HighlightedRange { | ||
13 | range: [16; 20), | ||
14 | tag: "function" | ||
15 | }, | ||
16 | HighlightedRange { | ||
17 | range: [41; 45), | ||
18 | tag: "macro" | ||
19 | }, | ||
20 | HighlightedRange { | ||
21 | range: [48; 51), | ||
22 | tag: "keyword" | ||
23 | }, | ||
24 | HighlightedRange { | ||
25 | range: [56; 58), | ||
26 | tag: "literal" | ||
27 | }, | ||
28 | HighlightedRange { | ||
29 | range: [48; 51), | ||
30 | tag: "keyword" | ||
31 | }, | ||
32 | HighlightedRange { | ||
33 | range: [52; 53), | ||
34 | tag: "function" | ||
35 | }, | ||
36 | HighlightedRange { | ||
37 | range: [56; 58), | ||
38 | tag: "literal" | ||
39 | }, | ||
40 | HighlightedRange { | ||
41 | range: [60; 61), | ||
42 | tag: "text" | ||
43 | } | ||
44 | ] | ||
diff --git a/crates/ra_ide_api/src/snapshots/tests__rename_mod_in_dir.snap b/crates/ra_ide_api/src/snapshots/tests__rename_mod_in_dir.snap deleted file mode 100644 index aaff9b4b5..000000000 --- a/crates/ra_ide_api/src/snapshots/tests__rename_mod_in_dir.snap +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | --- | ||
2 | created: "2019-05-23T22:23:35.213830371Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/references.rs | ||
5 | expression: "&source_change" | ||
6 | --- | ||
7 | Some( | ||
8 | SourceChange { | ||
9 | label: "rename", | ||
10 | source_file_edits: [ | ||
11 | SourceFileEdit { | ||
12 | file_id: FileId( | ||
13 | 1, | ||
14 | ), | ||
15 | edit: TextEdit { | ||
16 | atoms: [ | ||
17 | AtomTextEdit { | ||
18 | delete: [4; 7), | ||
19 | insert: "foo2", | ||
20 | }, | ||
21 | ], | ||
22 | }, | ||
23 | }, | ||
24 | ], | ||
25 | file_system_edits: [ | ||
26 | MoveFile { | ||
27 | src: FileId( | ||
28 | 2, | ||
29 | ), | ||
30 | dst_source_root: SourceRootId( | ||
31 | 0, | ||
32 | ), | ||
33 | dst_path: "foo2/mod.rs", | ||
34 | }, | ||
35 | ], | ||
36 | cursor_position: None, | ||
37 | }, | ||
38 | ) | ||