[tests] Minor fixes in control flow collections for tests

Change-Id: I61bbe247b8474a6eeb2d63f9acbd99218f2d04e6
Reviewed-on: https://dart-review.googlesource.com/c/94140
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
This commit is contained in:
Nicholas Shahan 2019-02-23 01:37:41 +00:00 committed by commit-bot@chromium.org
parent f0155931a9
commit 646c1f679a

View file

@ -178,7 +178,7 @@ void testSet() {
// Does not flatten nested collection literal.
Expect.listEquals([1], {for (var i = 1; i < 2; i++) [i]}.first);
Expect.mapEquals({1: 1}, {for (var i = 1; i < 2; i++) {i: i}}.first);
Expect.setEquals({1}, }for (var i = 1; i < 2; i++) {i}}.first);
Expect.setEquals({1}, {for (var i = 1; i < 2; i++) {i}}.first);
// Downcast variable.
Expect.setEquals(set, <int>{for (int n in <num>[1, 2, 3, 4]) n});
@ -196,13 +196,15 @@ void testDuplicateKeys() {
1: 1,
for (var i in <int>[1, 2, 3]) i: i,
for (var i = 2; i <= 3; i++) i: i,
3: 3
3: 3,
4: 4
});
Expect.setEquals(set, <int>{
1,
for (var i in <int>[1, 2, 3]) i,
for (var i = 2; i <= 3; i++) i,
3
3,
4
});
}