From b06259673f9b535a63c0cabf4eeb935ff73d86d0 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 2 Oct 2020 17:34:31 +0200 Subject: rename mock_analysis -> fixture --- crates/ide/src/syntax_tree.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'crates/ide/src/syntax_tree.rs') diff --git a/crates/ide/src/syntax_tree.rs b/crates/ide/src/syntax_tree.rs index f80044959..0eed2dbd7 100644 --- a/crates/ide/src/syntax_tree.rs +++ b/crates/ide/src/syntax_tree.rs @@ -104,12 +104,12 @@ fn syntax_tree_for_token(node: &SyntaxToken, text_range: TextRange) -> Optionfn foo() {}<|>"#.trim()); + let (analysis, range) = fixture::range(r#"<|>fn foo() {}<|>"#.trim()); let syn = analysis.syntax_tree(range.file_id, Some(range.range)).unwrap(); assert_eq_text!( @@ -206,7 +206,7 @@ FN@0..11 .trim() ); - let (analysis, range) = analysis_and_range( + let (analysis, range) = fixture::range( r#"fn test() { <|>assert!(" fn foo() { @@ -242,7 +242,7 @@ EXPR_STMT@16..58 #[test] fn test_syntax_tree_inside_string() { - let (analysis, range) = analysis_and_range( + let (analysis, range) = fixture::range( r#"fn test() { assert!(" <|>fn foo() { @@ -276,7 +276,7 @@ SOURCE_FILE@0..12 ); // With a raw string - let (analysis, range) = analysis_and_range( + let (analysis, range) = fixture::range( r###"fn test() { assert!(r#" <|>fn foo() { @@ -310,7 +310,7 @@ SOURCE_FILE@0..12 ); // With a raw string - let (analysis, range) = analysis_and_range( + let (analysis, range) = fixture::range( r###"fn test() { assert!(r<|>#" fn foo() { -- cgit v1.2.3