Skip to content

Commit 623a9bd

Browse files
leafpetersencommit-bot@chromium.org
authored andcommitted
Fix async test to match inference changes from flutter#43162.
Closes flutter#43440 . Change-Id: If25e49400d63698b974ab935f483804e36e22f98 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163040 Auto-Submit: Leaf Petersen <[email protected]> Commit-Queue: Lasse R.H. Nielsen <[email protected]> Reviewed-by: Lasse R.H. Nielsen <[email protected]>
1 parent b3bd2e9 commit 623a9bd

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

tests/language/async/await_test.dart

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,7 +1367,7 @@ main() {
13671367

13681368
group("if", () {
13691369
test("await in test", () {
1370-
f(v) async {
1370+
f(bool v) async {
13711371
if (await new Future.value(v)) {
13721372
return 42;
13731373
} else {
@@ -1379,7 +1379,7 @@ main() {
13791379
});
13801380

13811381
test("await err in test", () {
1382-
f(v) async {
1382+
f(bool v) async {
13831383
if (await new Future.error("err")) {
13841384
return 42;
13851385
} else {
@@ -1391,7 +1391,7 @@ main() {
13911391
});
13921392

13931393
test("await in then", () {
1394-
f(v) async {
1394+
f(bool v) async {
13951395
if (v) {
13961396
return await new Future.value(42);
13971397
}
@@ -1402,7 +1402,7 @@ main() {
14021402
});
14031403

14041404
test("await err in then", () {
1405-
f(v) async {
1405+
f(bool v) async {
14061406
if (v) {
14071407
return await new Future.error("err");
14081408
}
@@ -1413,7 +1413,7 @@ main() {
14131413
});
14141414

14151415
test("await in then with else", () {
1416-
f(v) async {
1416+
f(bool v) async {
14171417
if (v) {
14181418
return await new Future.value(42);
14191419
} else {
@@ -1426,7 +1426,7 @@ main() {
14261426
});
14271427

14281428
test("await err in then with else", () {
1429-
f(v) async {
1429+
f(bool v) async {
14301430
if (v) {
14311431
return await new Future.error("err");
14321432
} else {
@@ -1439,7 +1439,7 @@ main() {
14391439
});
14401440

14411441
test("await in else", () {
1442-
f(v) async {
1442+
f(bool v) async {
14431443
if (v) {
14441444
return 37;
14451445
} else {
@@ -1452,7 +1452,7 @@ main() {
14521452
});
14531453

14541454
test("await err in else", () {
1455-
f(v) async {
1455+
f(bool v) async {
14561456
if (v) {
14571457
return 37;
14581458
} else {
@@ -1465,7 +1465,7 @@ main() {
14651465
});
14661466

14671467
test("await in else-if test", () {
1468-
f(v) async {
1468+
f(bool v) async {
14691469
if (v) {
14701470
return 37;
14711471
} else if (!await new Future.value(v)) {
@@ -1480,7 +1480,7 @@ main() {
14801480
});
14811481

14821482
test("await in else-if then", () {
1483-
f(v) async {
1483+
f(bool v) async {
14841484
if (v) {
14851485
return 37;
14861486
} else if (!v) {
@@ -1497,47 +1497,47 @@ main() {
14971497

14981498
group("conditional operator", () {
14991499
test("await in test", () {
1500-
f(v) async {
1500+
f(bool v) async {
15011501
return (await new Future.value(v)) ? 42 : 37;
15021502
}
15031503

15041504
return expect42(f(true));
15051505
});
15061506

15071507
test("await err in test", () {
1508-
f(v) async {
1508+
f(bool v) async {
15091509
return (await new Future.error("err")) ? 42 : 37;
15101510
}
15111511

15121512
return throwsErr(f(true));
15131513
});
15141514

15151515
test("await in then", () {
1516-
f(v) async {
1516+
f(bool v) async {
15171517
return v ? (await new Future.value(42)) : 37;
15181518
}
15191519

15201520
return expect42(f(true));
15211521
});
15221522

15231523
test("await err in then", () {
1524-
f(v) async {
1524+
f(bool v) async {
15251525
return v ? (await new Future.error("err")) : 37;
15261526
}
15271527

15281528
return throwsErr(f(true));
15291529
});
15301530

15311531
test("await in else", () {
1532-
f(v) async {
1532+
f(bool v) async {
15331533
return v ? 37 : (await new Future.value(42));
15341534
}
15351535

15361536
return expect42(f(false));
15371537
});
15381538

15391539
test("await err in else", () {
1540-
f(v) async {
1540+
f(bool v) async {
15411541
return v ? 37 : (await new Future.error("err"));
15421542
}
15431543

0 commit comments

Comments
 (0)