dart-sdk/tests
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
..
co19 [co19] LibTests/typed_data tests skipped for dart2js 2021-08-16 08:07:34 +00:00
co19_2 [co19] LibTests/typed_data tests skipped for dart2js 2021-08-16 08:07:34 +00:00
corelib Tweaks, refactoring and updates on DoubleLinkedQueue. 2021-08-31 12:44:39 +00:00
corelib_2 Tweaks, refactoring and updates on DoubleLinkedQueue. 2021-08-31 12:44:39 +00:00
dartdevc [ddc] Unify pkg:js types and allow subtyping between them 2021-07-30 00:33:54 +00:00
dartdevc_2 [ddc] Unify pkg:js types and allow subtyping between them 2021-07-30 00:33:54 +00:00
ffi [VM] Moves FfiNative fields to function parent. 2021-08-09 09:13:38 +00:00
ffi_2 [vm] Remove --experimental-enable-isolate-groups-jit, only guard via --enable-isolate-groups 2021-07-16 09:13:28 +00:00
language Suppress redundant tearoff errors when constructor tearoffs not enabled 2021-08-30 17:19:07 +00:00
language_2 Suppress redundant tearoff errors when constructor tearoffs not enabled 2021-08-30 17:19:07 +00:00
lib Tweaks, refactoring and updates on DoubleLinkedQueue. 2021-08-31 12:44:39 +00:00
lib_2 Tweaks, refactoring and updates on DoubleLinkedQueue. 2021-08-31 12:44:39 +00:00
modular [ddc] Fix private class exposed by typedef 2021-04-05 18:54:56 +00:00
standalone [VM/Runtime] Reland : Fix 'File' object leak in async file open operation 2021-08-27 17:45:17 +00:00
standalone_2 [VM/Runtime] Reland : Fix 'File' object leak in async file open operation 2021-08-27 17:45:17 +00:00
web [dart2js, js_runtime, js_dev_runtime] NaN-safe range checks. 2021-08-27 00:37:56 +00:00
web_2 Remove obsolete internal dart2js annotations 2021-08-04 23:27:18 +00:00
legacy_status_dart2js.csv [dart2js] Remove obsolete unittests. 2020-05-12 17:16:39 +00:00
README.md

This directory contains tests of the language and core library implementations. For more information, see https://github.com/dart-lang/sdk/wiki/Testing.