File tree Expand file tree Collapse file tree 1 file changed +23
-7
lines changed Expand file tree Collapse file tree 1 file changed +23
-7
lines changed Original file line number Diff line number Diff line change @@ -576,8 +576,14 @@ mod tests {
576
576
fn check_tests ( ra_fixture : & str , expect : Expect ) {
577
577
let ( analysis, position) = fixture:: position ( ra_fixture) ;
578
578
let tests = analysis. related_tests ( position, None ) . unwrap ( ) ;
579
- let test_names = tests. into_iter ( ) . map ( |a| a. nav . name ) . collect :: < Vec < _ > > ( ) ;
580
- expect. assert_debug_eq ( & test_names) ;
579
+ let test_ids = tests
580
+ . into_iter ( )
581
+ . map ( |runnable| match runnable. kind {
582
+ RunnableKind :: Test { test_id, .. } => test_id,
583
+ _ => unreachable ! ( ) ,
584
+ } )
585
+ . collect :: < Vec < _ > > ( ) ;
586
+ expect. assert_debug_eq ( & test_ids) ;
581
587
}
582
588
583
589
#[ test]
@@ -2144,7 +2150,9 @@ mod tests {
2144
2150
"# ,
2145
2151
expect ! [ [ r#"
2146
2152
[
2147
- "foo_test",
2153
+ Path(
2154
+ "tests::foo_test",
2155
+ ),
2148
2156
]
2149
2157
"# ] ] ,
2150
2158
) ;
@@ -2169,7 +2177,9 @@ mod tests {
2169
2177
"# ,
2170
2178
expect ! [ [ r#"
2171
2179
[
2172
- "foo_test",
2180
+ Path(
2181
+ "tests::foo_test",
2182
+ ),
2173
2183
]
2174
2184
"# ] ] ,
2175
2185
) ;
@@ -2201,7 +2211,9 @@ mod tests {
2201
2211
"# ,
2202
2212
expect ! [ [ r#"
2203
2213
[
2204
- "foo_test",
2214
+ Path(
2215
+ "tests::foo_test",
2216
+ ),
2205
2217
]
2206
2218
"# ] ] ,
2207
2219
) ;
@@ -2233,8 +2245,12 @@ mod tests {
2233
2245
"# ,
2234
2246
expect ! [ [ r#"
2235
2247
[
2236
- "foo2_test",
2237
- "foo_test",
2248
+ Path(
2249
+ "tests::foo2_test",
2250
+ ),
2251
+ Path(
2252
+ "tests::foo_test",
2253
+ ),
2238
2254
]
2239
2255
"# ] ] ,
2240
2256
) ;
You can’t perform that action at this time.
0 commit comments