mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 05:50:29 +00:00
050afd650f
Today, most tests that touch on a behavior variation end up skipping expectations or the entirety of a test for some testing configurations. Moving forward, we'd like skip less and try to account for the behavior variations if that's reasonable. This CL shows an approach to improve our test coverage for behavior variations. We introduce two new methods to [Expect] that allow us to conditionally check that a function throws, depending on variation predicates. The CL changes expectations for errors that don't occur when dart2js omits parameter type checks or implicit downcasts. Note: originally I had the intention to introduce a name parameter to `Expect.throws` and `Expect.throwsTypeError` to avoid introducing a new API. However, because these APIs are used for testing core language features, such as function parameters themselves, we decided to keep the use of features in these APIs as simple as it can be. CoreLibraryReviewExempt: no public library semantic change - only improving test coverage under variations Change-Id: I531657622655778491eaca8b37ba69ffaab559fc Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351340 Reviewed-by: Lasse Nielsen <lrn@google.com> Commit-Queue: Sigmund Cherem <sigmund@google.com> |
||
---|---|---|
.. | ||
callable_class_field_getter_test.dart | ||
covariant_test.dart | ||
field_test.dart | ||
method_test.dart | ||
override_covariant_both_test.dart | ||
override_covariant_class_test.dart | ||
override_covariant_interface_test.dart | ||
override_covariant_superclass_test.dart | ||
override_test.dart | ||
return_type_test.dart | ||
setter_test.dart | ||
subtyping_tearoff1_test.dart | ||
subtyping_tearoff2_test.dart | ||
subtyping_tearoff3_test.dart | ||
subtyping_test.dart | ||
subtyping_unsafe_call1_test.dart | ||
subtyping_unsafe_call2_test.dart | ||
subtyping_unsafe_call3_test.dart | ||
subtyping_with_mixin_test.dart | ||
tear_off_type_test.dart | ||
type_parameter_test.dart |