aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/display
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-10-02 16:50:20 +0100
committerGitHub <[email protected]>2020-10-02 16:50:20 +0100
commit673e1ddb9ae12c565f966549ba7ea8c306cfba87 (patch)
treea1d9c304711806c393163547fe6da69289aa9f16 /crates/ide/src/display
parenta360832c95dbfe10167ebebe4978760e9be6a4bd (diff)
parentb06259673f9b535a63c0cabf4eeb935ff73d86d0 (diff)
Merge #6123
6123: Reduce duplication in fixtures r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide/src/display')
-rw-r--r--crates/ide/src/display/navigation_target.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ide/src/display/navigation_target.rs b/crates/ide/src/display/navigation_target.rs
index 1ee80c2dd..cf9d617dc 100644
--- a/crates/ide/src/display/navigation_target.rs
+++ b/crates/ide/src/display/navigation_target.rs
@@ -423,11 +423,11 @@ pub(crate) fn description_from_symbol(db: &RootDatabase, symbol: &FileSymbol) ->
423mod tests { 423mod tests {
424 use expect_test::expect; 424 use expect_test::expect;
425 425
426 use crate::{mock_analysis::single_file, Query}; 426 use crate::{fixture, Query};
427 427
428 #[test] 428 #[test]
429 fn test_nav_for_symbol() { 429 fn test_nav_for_symbol() {
430 let (analysis, _) = single_file( 430 let (analysis, _) = fixture::file(
431 r#" 431 r#"
432enum FooInner { } 432enum FooInner { }
433fn foo() { enum FooInner { } } 433fn foo() { enum FooInner { } }
@@ -439,7 +439,7 @@ fn foo() { enum FooInner { } }
439 [ 439 [
440 NavigationTarget { 440 NavigationTarget {
441 file_id: FileId( 441 file_id: FileId(
442 1, 442 0,
443 ), 443 ),
444 full_range: 0..17, 444 full_range: 0..17,
445 focus_range: Some( 445 focus_range: Some(
@@ -455,7 +455,7 @@ fn foo() { enum FooInner { } }
455 }, 455 },
456 NavigationTarget { 456 NavigationTarget {
457 file_id: FileId( 457 file_id: FileId(
458 1, 458 0,
459 ), 459 ),
460 full_range: 29..46, 460 full_range: 29..46,
461 focus_range: Some( 461 focus_range: Some(
@@ -478,7 +478,7 @@ fn foo() { enum FooInner { } }
478 478
479 #[test] 479 #[test]
480 fn test_world_symbols_are_case_sensitive() { 480 fn test_world_symbols_are_case_sensitive() {
481 let (analysis, _) = single_file( 481 let (analysis, _) = fixture::file(
482 r#" 482 r#"
483fn foo() {} 483fn foo() {}
484struct Foo; 484struct Foo;