| OLD | NEW | 
|---|
| 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 16 matching lines...) Expand all  Loading... | 
| 27 | 27 | 
| 28 checkTypeVariable(TypeVariableMirror tvm) { | 28 checkTypeVariable(TypeVariableMirror tvm) { | 
| 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   print(mm); | 
| 37   checkList(mm.parameters, 'MethodMirror.parameters'); | 38   checkList(mm.parameters, 'MethodMirror.parameters'); | 
| 38   checkList(mm.metadata, 'MethodMirror.metadata'); | 39   checkList(mm.metadata, 'MethodMirror.metadata'); | 
| 39 |  | 
| 40   mm.parameters.forEach(checkParameter); | 40   mm.parameters.forEach(checkParameter); | 
| 41 } | 41 } | 
| 42 | 42 | 
| 43 checkClass(ClassMirror cm) { | 43 checkClass(ClassMirror cm) { | 
| 44   checkMap(cm.declarations, 'ClassMirror.declarations'); | 44   checkMap(cm.declarations, 'ClassMirror.declarations'); | 
| 45   checkMap(cm.instanceMembers, 'ClassMirror.instanceMembers'); | 45   checkMap(cm.instanceMembers, 'ClassMirror.instanceMembers'); | 
| 46   checkMap(cm.staticMembers, 'ClassMirror.staticMembers'); | 46   checkMap(cm.staticMembers, 'ClassMirror.staticMembers'); | 
| 47   checkList(cm.metadata, 'ClassMirror.metadata'); | 47   checkList(cm.metadata, 'ClassMirror.metadata'); | 
| 48   checkList(cm.superinterfaces, 'ClassMirror.superinterfaces'); | 48   checkList(cm.superinterfaces, 'ClassMirror.superinterfaces'); | 
| 49   checkList(cm.typeArguments, 'ClassMirror.typeArguments'); | 49   checkList(cm.typeArguments, 'ClassMirror.typeArguments'); | 
| (...skipping 22 matching lines...) Expand all  Loading... | 
| 72   checkList(lm.metadata, 'LibraryMirror.metadata'); | 72   checkList(lm.metadata, 'LibraryMirror.metadata'); | 
| 73 | 73 | 
| 74   lm.declarations.values.forEach(checkDeclaration); | 74   lm.declarations.values.forEach(checkDeclaration); | 
| 75 } | 75 } | 
| 76 | 76 | 
| 77 main() { | 77 main() { | 
| 78   currentMirrorSystem().libraries.values.forEach(checkLibrary); | 78   currentMirrorSystem().libraries.values.forEach(checkLibrary); | 
| 79   checkType(currentMirrorSystem().voidType); | 79   checkType(currentMirrorSystem().voidType); | 
| 80   checkType(currentMirrorSystem().dynamicType); | 80   checkType(currentMirrorSystem().dynamicType); | 
| 81 } | 81 } | 
| OLD | NEW | 
|---|