Inline snapshots for all tests in references.rs
This commit is contained in:
parent
69244a6e18
commit
8f71614bdd
@ -341,7 +341,39 @@ mod tests {
|
||||
);
|
||||
let new_name = "foo2";
|
||||
let source_change = analysis.rename(position, new_name).unwrap();
|
||||
assert_debug_snapshot_matches!("rename_mod", &source_change);
|
||||
assert_debug_snapshot_matches!(&source_change,
|
||||
@r#"Some(
|
||||
SourceChange {
|
||||
label: "rename",
|
||||
source_file_edits: [
|
||||
SourceFileEdit {
|
||||
file_id: FileId(
|
||||
2,
|
||||
),
|
||||
edit: TextEdit {
|
||||
atoms: [
|
||||
AtomTextEdit {
|
||||
delete: [4; 7),
|
||||
insert: "foo2",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
file_system_edits: [
|
||||
MoveFile {
|
||||
src: FileId(
|
||||
3,
|
||||
),
|
||||
dst_source_root: SourceRootId(
|
||||
0,
|
||||
),
|
||||
dst_path: "bar/foo2.rs",
|
||||
},
|
||||
],
|
||||
cursor_position: None,
|
||||
},
|
||||
)"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -1,38 +0,0 @@
|
||||
---
|
||||
created: "2019-05-23T22:23:35.215905447Z"
|
||||
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(
|
||||
2,
|
||||
),
|
||||
edit: TextEdit {
|
||||
atoms: [
|
||||
AtomTextEdit {
|
||||
delete: [4; 7),
|
||||
insert: "foo2",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
file_system_edits: [
|
||||
MoveFile {
|
||||
src: FileId(
|
||||
3,
|
||||
),
|
||||
dst_source_root: SourceRootId(
|
||||
0,
|
||||
),
|
||||
dst_path: "bar/foo2.rs",
|
||||
},
|
||||
],
|
||||
cursor_position: None,
|
||||
},
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user