Chromium Code Reviews| Index: tests/lib/mirrors/parameter_test.dart |
| diff --git a/tests/lib/mirrors/parameter_test.dart b/tests/lib/mirrors/parameter_test.dart |
| index 7c538a773bf4b489e26420c77237b94aa0218a0c..fa49e3927c93fe1d7f065e9ecbe4c1ca0701ab56 100644 |
| --- a/tests/lib/mirrors/parameter_test.dart |
| +++ b/tests/lib/mirrors/parameter_test.dart |
| @@ -31,6 +31,12 @@ class B { |
| waldo(int z); |
| } |
| +class C <S extends Object, T> { |
| + // TODO(6490): Currently only supported by the VM. |
| + foo(int a, S b) => b; |
| + bar(S a, T b, num c) {} |
| +} |
| + |
| main() { |
| ClassMirror cm = reflectClass(B); |
| Map<Symbol, MethodMirror> constructors = cm.constructors; |
| @@ -141,4 +147,23 @@ main() { |
| ' type = Class(s(int) in s(dart.core), top-level))]', |
| waldo.parameters); |
| expect('<null>', waldo.parameters[0].defaultValue); |
| + |
| + cm = reflectClass(C); |
| + MethodMirror fooInC = cm.members[const Symbol("foo")]; |
| + expect('Method(s(foo) in s(C))', fooInC); |
| + expect('[Parameter(s(a) in s(foo),' |
| + ' type = Class(s(int) in s(dart.core), top-level)), ' |
| + 'Parameter(s(b) in s(foo),' |
| + ' type = Type(s(S) in s(C)))]', |
|
rmacnak
2013/09/11 21:17:21
We should probably check that it is specifically a
Michael Lippautz (Google)
2013/09/11 21:52:41
Done.
|
| + fooInC.parameters); |
| + |
| + MethodMirror barInC = cm.members[const Symbol("bar")]; |
| + expect('Method(s(bar) in s(C))', barInC); |
| + expect('[Parameter(s(a) in s(bar),' |
| + ' type = Type(s(S) in s(C))), ' |
| + 'Parameter(s(b) in s(bar),' |
| + ' type = Type(s(T) in s(C))), ' |
| + 'Parameter(s(c) in s(bar),' |
| + ' type = Class(s(num) in s(dart.core), top-level))]', |
| + barInC.parameters); |
| } |