From 8f71614bdd1e3f07019b1629235a68417adf7e27 Mon Sep 17 00:00:00 2001 From: Phil Ellison Date: Sun, 28 Jul 2019 11:52:17 +0100 Subject: Inline snapshots for all tests in references.rs --- crates/ra_ide_api/src/references.rs | 34 ++++++++++++++++++- .../src/snapshots/tests__rename_mod.snap | 38 ---------------------- 2 files changed, 33 insertions(+), 39 deletions(-) delete mode 100644 crates/ra_ide_api/src/snapshots/tests__rename_mod.snap (limited to 'crates/ra_ide_api/src') diff --git a/crates/ra_ide_api/src/references.rs b/crates/ra_ide_api/src/references.rs index 9b9f75af0..9e2601f83 100644 --- a/crates/ra_ide_api/src/references.rs +++ b/crates/ra_ide_api/src/references.rs @@ -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] diff --git a/crates/ra_ide_api/src/snapshots/tests__rename_mod.snap b/crates/ra_ide_api/src/snapshots/tests__rename_mod.snap deleted file mode 100644 index 431de5c55..000000000 --- a/crates/ra_ide_api/src/snapshots/tests__rename_mod.snap +++ /dev/null @@ -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, - }, -) -- cgit v1.2.3