You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[flow analysis] Change unit tests to match new promotion chain representation.
In https://dart-review.googlesource.com/c/sdk/+/443540, the
representation for promotion chains in flow analysis was changed so
that an empty promotion chain is now represented by an empty list
rather than `null`, but to reduce the risk of mistakes, only minimal
changes were made to flow analysis unit tests.
This CL updates the unit tests to follow the same convention.
This change also fixes a previously unnoticed bug in the flow analysis
unit tests. Previously, there were several test cases that passed a
`null` value to `_matchVariableModel`'s `chain` parameter, with the
intention of checking that the promotion chain was empty. However,
`_matchVariableModel` converts a `null` value of `chain` to `anything`
(to handle test cases where the promotion chain isn't of interest), so
as a result, these test cases accidentally failed to check that the
promotion chain was empty. These test cases have been changed to pass
`isEmpty`, so these unit tests are actually stronger now.
Change-Id: Ibf19d1ff64075d9f37fa85f85e11df417c0a68e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/443541
Commit-Queue: Paul Berry <[email protected]>
Reviewed-by: Erik Ernst <[email protected]>
0 commit comments