@@ -576,7 +576,8 @@ mod tests {
576576 fn check_tests ( ra_fixture : & str , expect : Expect ) {
577577 let ( analysis, position) = fixture:: position ( ra_fixture) ;
578578 let tests = analysis. related_tests ( position, None ) . unwrap ( ) ;
579- expect. assert_debug_eq ( & tests) ;
579+ let test_names = tests. into_iter ( ) . map ( |a| a. nav . name ) . collect :: < Vec < _ > > ( ) ;
580+ expect. assert_debug_eq ( & test_names) ;
580581 }
581582
582583 #[ test]
@@ -2143,27 +2144,7 @@ mod tests {
21432144"# ,
21442145 expect ! [ [ r#"
21452146 [
2146- Runnable {
2147- use_name_in_title: false,
2148- nav: NavigationTarget {
2149- file_id: FileId(
2150- 0,
2151- ),
2152- full_range: 31..85,
2153- focus_range: 46..54,
2154- name: "foo_test",
2155- kind: Function,
2156- },
2157- kind: Test {
2158- test_id: Path(
2159- "tests::foo_test",
2160- ),
2161- attr: TestAttr {
2162- ignore: false,
2163- },
2164- },
2165- cfg: None,
2166- },
2147+ "foo_test",
21672148 ]
21682149 "# ] ] ,
21692150 ) ;
@@ -2188,27 +2169,7 @@ mod tests {
21882169"# ,
21892170 expect ! [ [ r#"
21902171 [
2191- Runnable {
2192- use_name_in_title: false,
2193- nav: NavigationTarget {
2194- file_id: FileId(
2195- 0,
2196- ),
2197- full_range: 71..122,
2198- focus_range: 86..94,
2199- name: "foo_test",
2200- kind: Function,
2201- },
2202- kind: Test {
2203- test_id: Path(
2204- "tests::foo_test",
2205- ),
2206- attr: TestAttr {
2207- ignore: false,
2208- },
2209- },
2210- cfg: None,
2211- },
2172+ "foo_test",
22122173 ]
22132174 "# ] ] ,
22142175 ) ;
@@ -2240,27 +2201,7 @@ mod tests {
22402201"# ,
22412202 expect ! [ [ r#"
22422203 [
2243- Runnable {
2244- use_name_in_title: false,
2245- nav: NavigationTarget {
2246- file_id: FileId(
2247- 0,
2248- ),
2249- full_range: 133..183,
2250- focus_range: 148..156,
2251- name: "foo_test",
2252- kind: Function,
2253- },
2254- kind: Test {
2255- test_id: Path(
2256- "tests::foo_test",
2257- ),
2258- attr: TestAttr {
2259- ignore: false,
2260- },
2261- },
2262- cfg: None,
2263- },
2204+ "foo_test",
22642205 ]
22652206 "# ] ] ,
22662207 ) ;
@@ -2292,48 +2233,8 @@ mod tests {
22922233"# ,
22932234 expect ! [ [ r#"
22942235 [
2295- Runnable {
2296- use_name_in_title: false,
2297- nav: NavigationTarget {
2298- file_id: FileId(
2299- 0,
2300- ),
2301- full_range: 121..185,
2302- focus_range: 136..145,
2303- name: "foo2_test",
2304- kind: Function,
2305- },
2306- kind: Test {
2307- test_id: Path(
2308- "tests::foo2_test",
2309- ),
2310- attr: TestAttr {
2311- ignore: false,
2312- },
2313- },
2314- cfg: None,
2315- },
2316- Runnable {
2317- use_name_in_title: false,
2318- nav: NavigationTarget {
2319- file_id: FileId(
2320- 0,
2321- ),
2322- full_range: 52..115,
2323- focus_range: 67..75,
2324- name: "foo_test",
2325- kind: Function,
2326- },
2327- kind: Test {
2328- test_id: Path(
2329- "tests::foo_test",
2330- ),
2331- attr: TestAttr {
2332- ignore: false,
2333- },
2334- },
2335- cfg: None,
2336- },
2236+ "foo2_test",
2237+ "foo_test",
23372238 ]
23382239 "# ] ] ,
23392240 ) ;
0 commit comments