sdk icon indicating copy to clipboard operation
sdk copied to clipboard

use requirements and variations across all SDK tests

Open sigmundch opened this issue 5 months ago • 1 comments

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:

  • [x] 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)
  • [x] 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.

sigmundch avatar Feb 01 '24 19:02 sigmundch

Linking Siggi's CL https://github.com/dart-lang/sdk/commit/5bf858c3603fff0d3fe44a5af06ec03f56f67a27 here for adding support for fine-grain requirements (variations) for my own reference.

kallentu avatar Feb 12 '24 23:02 kallentu