Commit graph

3 commits

Author SHA1 Message Date
Leaf Petersen b101a7d002 Add language versions to _2 test libraries
Change-Id: Ib33169c3e0ffc870915c189404074a1dea472546
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196548
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2021-04-26 17:58:57 +00:00
Alexander Markov 236aef873a Update test corelib_2/iterable_to_list_test for Dart 2 type inference
According to Leaf, Dart 2 type inference prefers to infer type
which is asked for, even if a more specific type can be inferred
from arguments.

It means that for

  testIterable({"x": 1, "y": 1}.keys, ["x", "y"]);

where

  testIterable(Iterable iterable, List expected, [int depth = 0])

the inferred type of map is Map<String, int>, but inferred type
of list is List (as testIterable argument type is List).

So this test is fixed by specifying type arguments of 'expected'
lists explicitly.

Change-Id: I2deab160038ee7abaad587920cb8fc620e09ebdf
Reviewed-on: https://dart-review.googlesource.com/39441
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-02-08 17:19:12 +00:00
Ben Konyi df3238ef2d Migrated test block 12 to Dart 2.0.
Modified json_map_test to not expect the maps to be of type Map<int,
dynamic>, and marked iterable_to_list_test and iterable_to_set_test as
failing on DDC in the status files.

BUG=
R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2996513002 .
2017-08-04 13:34:48 -07:00
Renamed from tests/corelib/iterable_to_list_test.dart (Browse further)