Skip to content

use requirements and variations across all SDK tests #54798

Open
@sigmundch

Description

@sigmundch

We are in the process of consolidating how we talk about variations of implementations in tests. This is a meta issue to track our work:

  • introduce a list of possible requirements test can demand. These are requirements based on current variations observed in Dart implementations like dart2js -O4 and AOT optimized runtimes. This will be eventually documented in our wiki, but currently includes things like: readable-type-strings, js-numbers, native-numbers, checked-parameters, checked-implicit-downcasts, etc).
  • Add support for specifying these requirements at a coarse-grain level (using the // Requirements= comments)
  • Add support for specifying fine-grain requirements (add a pkg:expect/variations.dart library).
  • Migrate all existing tests to use the new requirement APIs.
  • Change, as needed, Expect.throws to take a conditional parameter to allow swapping expectations based on variations in behavior. This may require switching to named parameters to make tests more legible.
  • Document these changes and intended usage on the wiki.

Metadata

Metadata

Labels

area-infrastructureUse area-infrastructure for SDK infrastructure issues, like continuous integration bot changes.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions