Commit 807c5ae
distance 0 selection
Summary:
This diff adds special handling for the case where a symbol passed to `hh --find-my-tests` is inside a file that contains test classes. In this case, we immediately select it (with distance 0).
Technical details:
Given that `hh --find-my-tests` is just doing a BFS traversal of the call graph at the moment, one may expect that we would handle this case (i.e, distance 0) uniformly with how we already select test files during the traversal. However, there's a bit of a difference in terms of when we find out which file a symbol lives in for the roots vs. the symbols we find on the way. Because of that, the logic for distance 0 is implemented as a special case.
Reviewed By: mheiber
Differential Revision: D83848013
fbshipit-source-id: 241ca89160d2ace03710b6442c455f41106954a01 parent 19967cc commit 807c5ae
File tree
2 files changed
+34
-4
lines changed- hphp/hack
- src/server
- test/integration
2 files changed
+34
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
235 | 251 | | |
236 | 252 | | |
237 | 253 | | |
| |||
245 | 261 | | |
246 | 262 | | |
247 | 263 | | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
252 | 270 | | |
253 | 271 | | |
254 | 272 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
122 | 134 | | |
123 | 135 | | |
124 | 136 | | |
| |||
0 commit comments