OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 single_library_test; | 5 library single_library_test; |
6 | 6 |
7 import 'package:path/path.dart' as p; | 7 import 'package:path/path.dart' as p; |
8 import 'package:unittest/unittest.dart'; | 8 import 'package:unittest/unittest.dart'; |
9 | 9 |
10 import '../lib/docgen.dart'; | 10 import '../lib/docgen.dart'; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 methodParameterDocComment = exportedClass.fixReference( | 82 methodParameterDocComment = exportedClass.fixReference( |
83 'B').children.first.text; | 83 'B').children.first.text; |
84 expect(methodParameterDocComment, 'test_lib.B'); | 84 expect(methodParameterDocComment, 'test_lib.B'); |
85 | 85 |
86 methodParameterDocComment = exportedClass.fixReference( | 86 methodParameterDocComment = exportedClass.fixReference( |
87 'testFunc').children.first.text; | 87 'testFunc').children.first.text; |
88 expect(methodParameterDocComment, 'test_lib.testFunc'); | 88 expect(methodParameterDocComment, 'test_lib.testFunc'); |
89 | 89 |
90 }); | 90 }); |
91 }); | 91 }); |
| 92 |
| 93 test('multiple exported libraries.', () { |
| 94 var lib_file = p.toUri(p.join(getMultiLibraryCodePath(), 'lib', |
| 95 'test_lib2.dart')); |
| 96 return getMirrorSystem([lib_file], false) |
| 97 .then((mirrorSystem) { |
| 98 var library = new Library(mirrorSystem.libraries[lib_file]); |
| 99 |
| 100 // Test that libraries do recursive exports correctly. |
| 101 expect(true, library.classes.keys.contains('Bar')); |
| 102 }); |
| 103 |
| 104 }); |
92 }); | 105 }); |
93 } | 106 } |
OLD | NEW |