dart-sdk/tests/lib
Lasse R.H. Nielsen ed3824a220 Tweaks, refactoring and updates on DoubleLinkedQueue.
It's a badly designed class, but this change makes it slightly better.
(We should consider moving it to package:collection and removing it from
the platform libraries. Eventually.)

The changes decouples the public `DoubleLinkedQueueEntry` class from
the actual queue implementation classes, avoiding the latter having
to share a generic `_Link<DoubleLinkedQueueEntry>` interface
which would force them to do otherwise unnecessary casts.

The public class should have been abstract, but isn't.
It's mainly used as the API of the entries exposed by DoubleLinkedQueue,
but it can also be used by itself to build double-linked lists that are
not part of a Queue, and the class can be extended.
If anyone does either, it should keep working, so it needs to be a concrete,
self-contained class with a generative constructor.

That class is moved to dart:_internal to avoid its private
implementation fields from interfering with the queue implementation classes,
which have similar fields, but can now have them at different types.
That's a hack, but it works.

The internal implementation of the DoubleLinkedQueue and its entries
are updated to better follow current programming idioms, and avoids
having fields on classes which don't need them.

Also fixes #27920
(`clear`ing a list now detaches each entry from the list so later `.contains`
won't give the wrong answer).

And moves queue tests from tests/corelib to tests/lib/collection,
since Queue isn't exposed by `dart:core`.

BUG= https://github.com/dart-lang/sdk/issues/27920

Change-Id: Ia3bb340a75886de160cc0e449947e8e7ee587061
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211265
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-08-31 12:44:39 +00:00
..
analyzer Set up new test suites for migrating the tests to NNBD. 2019-11-19 00:18:43 +00:00
async [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
collection Tweaks, refactoring and updates on DoubleLinkedQueue. 2021-08-31 12:44:39 +00:00
convert Fix null-safety migration bug in VM version of fuse JSON-UTF-8 decoder. 2021-06-07 11:43:02 +00:00
developer Migrate lib_2/developer/timeline_recorders_test.dart to null safety. 2020-06-25 21:21:32 +00:00
fix_data_tests Add fixes for HttpStatus constants 2021-06-22 23:39:57 +00:00
html Remove obsolete internal dart2js annotations 2021-08-04 23:27:18 +00:00
isolate [vm, isolate] Also apply fast copying to an isolate's initial message. 2021-08-12 20:25:30 +00:00
js [package:js] Allow external extension members for Native classes 2021-07-30 18:43:47 +00:00
math Fix behavior for -infinity width/height of rectangles. 2021-06-21 13:29:39 +00:00
mirrors Fix scope resolution of metadata on type parameters 2021-08-17 15:17:02 +00:00
typed_data Seal typed-data types. 2021-05-05 18:04:05 +00:00
wasm [wasm] Use wasm traps to handle exceptions 2020-11-02 23:32:20 +00:00
web [web] remove mirrors patch for web compilers. 2020-07-16 00:12:22 +00:00
analysis_options.yaml [tests] Add analysis options file to migrated test directories 2020-03-16 20:51:26 +00:00
lib.status [vm/concurrency] Enable more isolate tests, remove outdated TODOs, fix 2 tests 2021-07-16 07:51:58 +00:00
lib_analyzer.status Set up new test suites for migrating the tests to NNBD. 2019-11-19 00:18:43 +00:00
lib_app_jit.status Set up new test suites for migrating the tests to NNBD. 2019-11-19 00:18:43 +00:00
lib_dart2js.status Optimize js_util callMethod calls for 0-4 arguments. 2021-06-30 20:11:44 +00:00
lib_dartdevc.status Refactored html/js_util_test.dart and added more js_util test coverage. 2021-02-24 00:58:47 +00:00
lib_kernel.status [SDK] Removes non-exiting tests from .status 2021-02-04 06:46:13 +00:00
lib_precompiled.status Set up new test suites for migrating the tests to NNBD. 2019-11-19 00:18:43 +00:00
lib_vm.status [vm/concurrency] Enable more isolate tests, remove outdated TODOs, fix 2 tests 2021-07-16 07:51:58 +00:00