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.library_declarations_test; | 5 library test.library_declarations_test; |
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 import 'stringify.dart'; | 10 import 'stringify.dart'; |
11 import 'declarations_model.dart' as declarations_model; | 11 import 'declarations_model.dart' as declarations_model; |
12 | 12 |
13 main() { | 13 main() { |
14 LibraryMirror lm = | 14 LibraryMirror lm = |
15 currentMirrorSystem().findLibrary(#test.declarations_model).single; | 15 currentMirrorSystem().findLibrary(#test.declarations_model); |
16 | 16 |
17 Expect.setEquals( | 17 Expect.setEquals( |
18 ['Variable(s(_libraryVariable)' | 18 ['Variable(s(_libraryVariable)' |
19 ' in s(test.declarations_model), private, top-level, static)', | 19 ' in s(test.declarations_model), private, top-level, static)', |
20 'Variable(s(libraryVariable)' | 20 'Variable(s(libraryVariable)' |
21 ' in s(test.declarations_model), top-level, static)'], | 21 ' in s(test.declarations_model), top-level, static)'], |
22 lm.declarations.values.where((dm) => dm is VariableMirror).map(stringify), | 22 lm.declarations.values.where((dm) => dm is VariableMirror).map(stringify), |
23 'variables'); | 23 'variables'); |
24 | 24 |
25 // dart2js stops testing here. | 25 // dart2js stops testing here. |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 'Method(s(libraryGetter)' | 113 'Method(s(libraryGetter)' |
114 ' in s(test.declarations_model), top-level, static, getter)', | 114 ' in s(test.declarations_model), top-level, static, getter)', |
115 'Method(s(libraryMethod) in s(test.declarations_model), top-level, static)', | 115 'Method(s(libraryMethod) in s(test.declarations_model), top-level, static)', |
116 'Method(s(librarySetter=)' | 116 'Method(s(librarySetter=)' |
117 ' in s(test.declarations_model), top-level, static, setter)', | 117 ' in s(test.declarations_model), top-level, static, setter)', |
118 'Variable(s(libraryVariable)' | 118 'Variable(s(libraryVariable)' |
119 ' in s(test.declarations_model), top-level, static)'], | 119 ' in s(test.declarations_model), top-level, static)'], |
120 lm.declarations.values.map(stringify), | 120 lm.declarations.values.map(stringify), |
121 'all declarations'); | 121 'all declarations'); |
122 } | 122 } |
OLD | NEW |