Remove unused highlights_code_inside_macro snapshot, inline rename_mod_in_dir snapshot

This commit is contained in:
Phil Ellison 2019-07-28 10:42:31 +01:00
parent 3e086528ef
commit 164ba6092c
3 changed files with 33 additions and 83 deletions

View File

@ -356,7 +356,39 @@ mod tests {
);
let new_name = "foo2";
let source_change = analysis.rename(position, new_name).unwrap();
assert_debug_snapshot_matches!("rename_mod_in_dir", &source_change);
assert_debug_snapshot_matches!(&source_change,
@r#"Some(
SourceChange {
label: "rename",
source_file_edits: [
SourceFileEdit {
file_id: FileId(
1,
),
edit: TextEdit {
atoms: [
AtomTextEdit {
delete: [4; 7),
insert: "foo2",
},
],
},
},
],
file_system_edits: [
MoveFile {
src: FileId(
2,
),
dst_source_root: SourceRootId(
0,
),
dst_path: "foo2/mod.rs",
},
],
cursor_position: None,
},
)"#);
}
fn test_rename(text: &str, new_name: &str, expected: &str) {

View File

@ -1,44 +0,0 @@
---
created: "2019-02-01T07:46:59.130146403+00:00"
creator: insta@0.5.3
expression: "&highlights"
source: crates/ra_ide_api/src/syntax_highlighting.rs
---
[
HighlightedRange {
range: [13; 15),
tag: "keyword"
},
HighlightedRange {
range: [16; 20),
tag: "function"
},
HighlightedRange {
range: [41; 45),
tag: "macro"
},
HighlightedRange {
range: [48; 51),
tag: "keyword"
},
HighlightedRange {
range: [56; 58),
tag: "literal"
},
HighlightedRange {
range: [48; 51),
tag: "keyword"
},
HighlightedRange {
range: [52; 53),
tag: "function"
},
HighlightedRange {
range: [56; 58),
tag: "literal"
},
HighlightedRange {
range: [60; 61),
tag: "text"
}
]

View File

@ -1,38 +0,0 @@
---
created: "2019-05-23T22:23:35.213830371Z"
creator: insta@0.8.1
source: crates/ra_ide_api/src/references.rs
expression: "&source_change"
---
Some(
SourceChange {
label: "rename",
source_file_edits: [
SourceFileEdit {
file_id: FileId(
1,
),
edit: TextEdit {
atoms: [
AtomTextEdit {
delete: [4; 7),
insert: "foo2",
},
],
},
},
],
file_system_edits: [
MoveFile {
src: FileId(
2,
),
dst_source_root: SourceRootId(
0,
),
dst_path: "foo2/mod.rs",
},
],
cursor_position: None,
},
)