| 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 "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
| 6 import "package:async_helper/async_helper.dart"; | 6 import "package:async_helper/async_helper.dart"; |
| 7 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart'
; | 7 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart'
; |
| 8 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.
dart'; | 8 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.
dart'; |
| 9 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirro
r.dart'; | 9 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirro
r.dart'; |
| 10 import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart' | 10 import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart' |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 var libraries = mirrors.libraries; | 64 var libraries = mirrors.libraries; |
| 65 Expect.isNotNull(libraries, "No libraries map returned"); | 65 Expect.isNotNull(libraries, "No libraries map returned"); |
| 66 Expect.isFalse(libraries.isEmpty, "Empty libraries map returned"); | 66 Expect.isFalse(libraries.isEmpty, "Empty libraries map returned"); |
| 67 | 67 |
| 68 var helperLibrary = findMirror(libraries.values, "mirrors_helper"); | 68 var helperLibrary = findMirror(libraries.values, "mirrors_helper"); |
| 69 Expect.isNotNull(helperLibrary, "Library 'mirrors_helper' not found"); | 69 Expect.isNotNull(helperLibrary, "Library 'mirrors_helper' not found"); |
| 70 Expect.stringEquals("mirrors_helper", helperLibrary.simpleName, | 70 Expect.stringEquals("mirrors_helper", helperLibrary.simpleName, |
| 71 "Unexpected library simple name"); | 71 "Unexpected library simple name"); |
| 72 Expect.stringEquals("mirrors_helper", helperLibrary.qualifiedName, | 72 Expect.stringEquals("mirrors_helper", helperLibrary.qualifiedName, |
| 73 "Unexpected library qualified name"); | 73 "Unexpected library qualified name"); |
| 74 Expect.equals(helperLibrary, mirrors.findLibrary('mirrors_helper').single); | 74 Expect.equals(helperLibrary, mirrors.findLibrary('mirrors_helper')); |
| 75 | 75 |
| 76 var helperLibraryLocation = helperLibrary.location; | 76 var helperLibraryLocation = helperLibrary.location; |
| 77 Expect.isNotNull(helperLibraryLocation); | 77 Expect.isNotNull(helperLibraryLocation); |
| 78 Expect.equals(271, helperLibraryLocation.offset, "Unexpected offset"); | 78 Expect.equals(271, helperLibraryLocation.offset, "Unexpected offset"); |
| 79 Expect.equals(23, helperLibraryLocation.length, "Unexpected length"); | 79 Expect.equals(23, helperLibraryLocation.length, "Unexpected length"); |
| 80 Expect.equals(9, helperLibraryLocation.line, "Unexpected line"); | 80 Expect.equals(9, helperLibraryLocation.line, "Unexpected line"); |
| 81 Expect.equals(1, helperLibraryLocation.column, "Unexpected column"); | 81 Expect.equals(1, helperLibraryLocation.column, "Unexpected column"); |
| 82 | 82 |
| 83 | 83 |
| 84 var classes = helperLibrary.classes; | 84 var classes = helperLibrary.classes; |
| (...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1026 Expect.isTrue(privateFactoryConstructor.isPrivate); | 1026 Expect.isTrue(privateFactoryConstructor.isPrivate); |
| 1027 Expect.isFalse(privateFactoryConstructor.isConstConstructor); | 1027 Expect.isFalse(privateFactoryConstructor.isConstConstructor); |
| 1028 Expect.isFalse(privateFactoryConstructor.isRedirectingConstructor); | 1028 Expect.isFalse(privateFactoryConstructor.isRedirectingConstructor); |
| 1029 Expect.isFalse(privateFactoryConstructor.isGenerativeConstructor); | 1029 Expect.isFalse(privateFactoryConstructor.isGenerativeConstructor); |
| 1030 Expect.isTrue(privateFactoryConstructor.isFactoryConstructor); | 1030 Expect.isTrue(privateFactoryConstructor.isFactoryConstructor); |
| 1031 | 1031 |
| 1032 var metadata = privateClass.metadata; | 1032 var metadata = privateClass.metadata; |
| 1033 Expect.isNotNull(metadata); | 1033 Expect.isNotNull(metadata); |
| 1034 Expect.equals(0, metadata.length); | 1034 Expect.equals(0, metadata.length); |
| 1035 } | 1035 } |
| OLD | NEW |