Chromium Code Reviews| Index: test/codegen/language/super_in_async2_test.dart |
| diff --git a/test/codegen/language/generic_async_star_test.dart b/test/codegen/language/super_in_async2_test.dart |
| similarity index 58% |
| copy from test/codegen/language/generic_async_star_test.dart |
| copy to test/codegen/language/super_in_async2_test.dart |
| index cf18af84924948a71e6e6420322cdd082319b6b7..403a1943192229ad04fd49648553435218f55cf9 100644 |
| --- a/test/codegen/language/generic_async_star_test.dart |
| +++ b/test/codegen/language/super_in_async2_test.dart |
| @@ -6,14 +6,18 @@ import "package:expect/expect.dart"; |
| import 'dart:async'; |
| -Stream/*<T>*/ foo/*<T>*/(/*=T*/ x) async* { |
| - for (int i = 0; i < 3; i++) { |
| - yield x; |
| - } |
| +class A { |
| + Future<int> foo() async => 42; |
| } |
| -main() async { |
| - await for (var x in foo/*<int>*/(1)) { |
| - Expect.equals(1, x); |
| +class B extends A { |
| + Future<int> foo() async { |
| + var x = await super.foo(); |
| + var y = await super.foo(); |
| + return x + y; |
| } |
| } |
| + |
| +main() async { |
| + Expect.equals(84, await new B().foo()); |
|
Jennifer Messerly
2016/05/05 23:50:48
fyi ... it's okay to combine tests too, especially
Harry Terkelsen
2016/05/05 23:58:40
Yeah, agreed. Filed this: https://github.com/dart-
|
| +} |