aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/extend_selection.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-14 13:27:08 +0000
committerAleksey Kladov <[email protected]>2019-01-15 11:18:24 +0000
commitd79a9b17dc4fb132443aa4ec1ca0ab278d2a217c (patch)
tree525b697381048b2f6d615a9c66c92485db8511ec /crates/ra_ide_api/src/extend_selection.rs
parent8caff4e03475c20392f13e8c6ad469bd01a4b4ce (diff)
switch to insta for testing
Diffstat (limited to 'crates/ra_ide_api/src/extend_selection.rs')
-rw-r--r--crates/ra_ide_api/src/extend_selection.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/extend_selection.rs b/crates/ra_ide_api/src/extend_selection.rs
index c3c809c9f..9f0ab2f1c 100644
--- a/crates/ra_ide_api/src/extend_selection.rs
+++ b/crates/ra_ide_api/src/extend_selection.rs
@@ -38,8 +38,9 @@ fn find_macro_call(node: &SyntaxNode, range: TextRange) -> Option<&ast::MacroCal
38 38
39#[cfg(test)] 39#[cfg(test)]
40mod tests { 40mod tests {
41 use ra_syntax::TextRange;
42
41 use crate::mock_analysis::single_file_with_range; 43 use crate::mock_analysis::single_file_with_range;
42 use test_utils::assert_eq_dbg;
43 44
44 #[test] 45 #[test]
45 fn extend_selection_inside_macros() { 46 fn extend_selection_inside_macros() {
@@ -51,6 +52,6 @@ mod tests {
51 ", 52 ",
52 ); 53 );
53 let r = analysis.extend_selection(frange); 54 let r = analysis.extend_selection(frange);
54 assert_eq_dbg("[51; 56)", &r); 55 assert_eq!(r, TextRange::from_to(51.into(), 56.into()));
55 } 56 }
56} 57}