6e249578f6
These tests cover just the portion of the subtype constraint generation mechanism that's currently shared between the analyzer and the CFE. I plan to add more unit tests as more functionality becomes shared. Note that as part of this change, I've eliminated the methods `performSubtypeConstraintGenerationForFutureOrRightSchema` and `performSubtypeConstraintGenerationForFutureOrLeftSchema`, and instead made `_performSubtypeConstraintGenerationForFutureOrInternal` public (renaming it to `performSubtypeConstraintGenerationForFutureOr`). My rationale for this change is as follows: - It makes testing easier, since only one method needs to be tested rather than two. - Removing these two methods simplifies the call sites in the analyzer and CFE, since instead of having to use an `if` test to decide which method to call, they can simply pass in the appropriate boolean switch for the `leftSchema` argument. Change-Id: I0911c80fc8e9a4fbdd3dd0063dd203066006c218 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386861 Commit-Queue: Paul Berry <paulberry@google.com> Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>