mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Inline snapshots for all tests in references.rs
This commit is contained in:
parent
69244a6e18
commit
8f71614bdd
2 changed files with 33 additions and 39 deletions
|
@ -341,7 +341,39 @@ mod tests {
|
||||||
);
|
);
|
||||||
let new_name = "foo2";
|
let new_name = "foo2";
|
||||||
let source_change = analysis.rename(position, new_name).unwrap();
|
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]
|
#[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…
Add table
Add a link
Reference in a new issue