Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Side by Side Diff: tests/lib/mirrors/immutable_collections_test.dart

Issue 212883009: Handle creating ParameterMirrors for the parameters of forwarding constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: test more levels of forwarding Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.immutable_collections; 5 library test.immutable_collections;
6 6
7 import 'dart:mirrors'; 7 import 'dart:mirrors';
8 import 'package:expect/expect.dart'; 8 import 'package:expect/expect.dart';
9 9
10 someException(e) => e is Exception || e is Error; 10 someException(e) => e is Exception || e is Error;
(...skipping 18 matching lines...) Expand all
29 checkList(tvm.metadata, 'TypeVariableMirror.metadata'); 29 checkList(tvm.metadata, 'TypeVariableMirror.metadata');
30 } 30 }
31 31
32 checkParameter(ParameterMirror pm) { 32 checkParameter(ParameterMirror pm) {
33 checkList(pm.metadata, 'ParameterMirror.metadata'); 33 checkList(pm.metadata, 'ParameterMirror.metadata');
34 } 34 }
35 35
36 checkMethod(MethodMirror mm) { 36 checkMethod(MethodMirror mm) {
37 checkList(mm.parameters, 'MethodMirror.parameters'); 37 checkList(mm.parameters, 'MethodMirror.parameters');
38 checkList(mm.metadata, 'MethodMirror.metadata'); 38 checkList(mm.metadata, 'MethodMirror.metadata');
39
40 mm.parameters.forEach(checkParameter); 39 mm.parameters.forEach(checkParameter);
41 } 40 }
42 41
43 checkClass(ClassMirror cm) { 42 checkClass(ClassMirror cm) {
44 checkMap(cm.declarations, 'ClassMirror.declarations'); 43 checkMap(cm.declarations, 'ClassMirror.declarations');
45 checkMap(cm.instanceMembers, 'ClassMirror.instanceMembers'); 44 checkMap(cm.instanceMembers, 'ClassMirror.instanceMembers');
46 checkMap(cm.staticMembers, 'ClassMirror.staticMembers'); 45 checkMap(cm.staticMembers, 'ClassMirror.staticMembers');
47 checkList(cm.metadata, 'ClassMirror.metadata'); 46 checkList(cm.metadata, 'ClassMirror.metadata');
48 checkList(cm.superinterfaces, 'ClassMirror.superinterfaces'); 47 checkList(cm.superinterfaces, 'ClassMirror.superinterfaces');
49 checkList(cm.typeArguments, 'ClassMirror.typeArguments'); 48 checkList(cm.typeArguments, 'ClassMirror.typeArguments');
(...skipping 22 matching lines...) Expand all
72 checkList(lm.metadata, 'LibraryMirror.metadata'); 71 checkList(lm.metadata, 'LibraryMirror.metadata');
73 72
74 lm.declarations.values.forEach(checkDeclaration); 73 lm.declarations.values.forEach(checkDeclaration);
75 } 74 }
76 75
77 main() { 76 main() {
78 currentMirrorSystem().libraries.values.forEach(checkLibrary); 77 currentMirrorSystem().libraries.values.forEach(checkLibrary);
79 checkType(currentMirrorSystem().voidType); 78 checkType(currentMirrorSystem().voidType);
80 checkType(currentMirrorSystem().dynamicType); 79 checkType(currentMirrorSystem().dynamicType);
81 } 80 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698