mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 08:24:39 +00:00
![]() 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> |
||
---|---|---|
.. | ||
apply_generic2_test.dart | ||
apply_generic_test.dart | ||
argument_test.dart | ||
call_generic_test.dart | ||
field_test.dart | ||
function_test.dart | ||
getter_test.dart | ||
literals2_test.dart | ||
literals_test.dart | ||
local2_test.dart | ||
local3_test.dart | ||
local_function_test.dart | ||
malformed_result_type_runtime_test.dart | ||
malformed_result_type_test.dart | ||
propagation_test.dart | ||
regress_45601_test.dart | ||
syntax_test.dart | ||
type2_test.dart | ||
type3_test.dart | ||
type_alias2_test.dart | ||
type_alias3_test.dart | ||
type_alias4_test.dart | ||
type_alias5_test.dart | ||
type_alias6_runtime_test.dart | ||
type_alias6_test.dart | ||
type_alias7_test.dart | ||
type_alias8_test.dart | ||
type_alias9_runtime_test.dart | ||
type_alias9_test.dart | ||
type_alias10_test.dart | ||
type_alias_test.dart | ||
type_call_getter2_runtime_test.dart | ||
type_call_getter2_test.dart | ||
type_call_getter_test.dart | ||
type_in_constant_test.dart | ||
type_parameter2_test.dart | ||
type_parameter3_test.dart | ||
type_parameter_bound_object_test.dart | ||
type_parameter_test.dart | ||
type_test.dart | ||
type_this_parameter_test.dart |