| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart'
; | 5 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart'
; |
| 6 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.
dart'; | 6 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.
dart'; |
| 7 | 7 |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 | 9 |
| 10 int count(Iterable iterable) { | 10 int count(Iterable iterable) { |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 Expect.isTrue(metadata8 is InstanceMirror); | 279 Expect.isTrue(metadata8 is InstanceMirror); |
| 280 Expect.isFalse(metadata8.hasReflectee); | 280 Expect.isFalse(metadata8.hasReflectee); |
| 281 Expect.throws(() => metadata8.reflectee, (_) => true); | 281 Expect.throws(() => metadata8.reflectee, (_) => true); |
| 282 Expect.equals(metadataType.originalDeclaration, metadata8.type); | 282 Expect.equals(metadataType.originalDeclaration, metadata8.type); |
| 283 metadata8.getField('data').then((InstanceMirror data) { | 283 metadata8.getField('data').then((InstanceMirror data) { |
| 284 Expect.isTrue(data is MapInstanceMirror); | 284 Expect.isTrue(data is MapInstanceMirror); |
| 285 Expect.isFalse(data.hasReflectee); | 285 Expect.isFalse(data.hasReflectee); |
| 286 Expect.throws(() => data.reflectee, (_) => true); | 286 Expect.throws(() => data.reflectee, (_) => true); |
| 287 MapInstanceMirror mapData = data; | 287 MapInstanceMirror mapData = data; |
| 288 Expect.equals(1, mapData.length); | 288 Expect.equals(1, mapData.length); |
| 289 Expect.stringEquals('foo', mapData.keys.iterator().next()); | 289 var it = mapData.keys.iterator; |
| 290 Expect.isTrue(it.moveNext()); |
| 291 Expect.stringEquals('foo', it.current); |
| 290 mapData['foo'].then((InstanceMirror element) { | 292 mapData['foo'].then((InstanceMirror element) { |
| 291 Expect.isNotNull(element); | 293 Expect.isNotNull(element); |
| 292 Expect.isTrue(element.hasReflectee); | 294 Expect.isTrue(element.hasReflectee); |
| 293 Expect.stringEquals("Foo", element.reflectee); | 295 Expect.stringEquals("Foo", element.reflectee); |
| 294 }); | 296 }); |
| 295 Expect.isNull(mapData['bar']); | 297 Expect.isNull(mapData['bar']); |
| 296 }); | 298 }); |
| 297 | 299 |
| 298 // @metadata | 300 // @metadata |
| 299 var metadata9 = metadata[9]; | 301 var metadata9 = metadata[9]; |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 951 Expect.isTrue(privateFactoryConstructor.isPrivate); | 953 Expect.isTrue(privateFactoryConstructor.isPrivate); |
| 952 Expect.isFalse(privateFactoryConstructor.isConstConstructor); | 954 Expect.isFalse(privateFactoryConstructor.isConstConstructor); |
| 953 Expect.isFalse(privateFactoryConstructor.isRedirectingConstructor); | 955 Expect.isFalse(privateFactoryConstructor.isRedirectingConstructor); |
| 954 Expect.isFalse(privateFactoryConstructor.isGenerativeConstructor); | 956 Expect.isFalse(privateFactoryConstructor.isGenerativeConstructor); |
| 955 Expect.isTrue(privateFactoryConstructor.isFactoryConstructor); | 957 Expect.isTrue(privateFactoryConstructor.isFactoryConstructor); |
| 956 | 958 |
| 957 var metadata = privateClass.metadata; | 959 var metadata = privateClass.metadata; |
| 958 Expect.isNotNull(metadata); | 960 Expect.isNotNull(metadata); |
| 959 Expect.equals(0, metadata.length); | 961 Expect.equals(0, metadata.length); |
| 960 } | 962 } |
| OLD | NEW |