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 import 'package:unittest/unittest.dart'; | 5 import 'package:unittest/unittest.dart'; |
6 | 6 |
7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
8 import 'dart:io' show Platform; | 8 import 'dart:io' show Platform; |
9 | 9 |
10 import '../lib/src/export_map.dart'; | 10 import '../lib/src/export_map.dart'; |
11 import '../../../../../tests/compiler/dart2js/memory_source_file_helper.dart' | 11 import '../../../../../tests/compiler/dart2js/memory_source_file_helper.dart' |
12 show MemorySourceFileProvider; | 12 show MemorySourceFileProvider; |
13 import '../../compiler/implementation/mirrors/mirrors.dart' | 13 import '../../compiler/implementation/mirrors/source_mirrors.dart' |
14 show MirrorSystem, LibraryMirror; | 14 show MirrorSystem, LibraryMirror; |
15 import '../../compiler/implementation/mirrors/dart2js_mirror.dart' | 15 import '../../compiler/implementation/mirrors/analyze.dart' |
16 as source_mirrors; | 16 as source_mirrors; |
17 | 17 |
18 Future<MirrorSystem> mirrorSystemFor(Map<String, String> memorySourceFiles) { | 18 Future<MirrorSystem> mirrorSystemFor(Map<String, String> memorySourceFiles) { |
19 var provider = new MemorySourceFileProvider(memorySourceFiles); | 19 var provider = new MemorySourceFileProvider(memorySourceFiles); |
20 handler(Uri uri, int begin, int end, String message, kind) {} | 20 handler(Uri uri, int begin, int end, String message, kind) {} |
21 | 21 |
22 var script = Uri.base.resolveUri(Platform.script); | 22 var script = Uri.base.resolveUri(Platform.script); |
23 var libraryRoot = script.resolve('../../../../'); | 23 var libraryRoot = script.resolve('../../../../'); |
24 // Read packages from 'memory:packages/'. | 24 // Read packages from 'memory:packages/'. |
25 var packageRoot = Uri.parse('memory:packages/'); | 25 var packageRoot = Uri.parse('memory:packages/'); |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 equals(new Export(null, null, hide: ['x']))); | 458 equals(new Export(null, null, hide: ['x']))); |
459 }); | 459 }); |
460 | 460 |
461 test('merging hide + hide takes the intersection', () { | 461 test('merging hide + hide takes the intersection', () { |
462 expect(new Export(null, null, hide: ['x', 'y']) | 462 expect(new Export(null, null, hide: ['x', 'y']) |
463 .merge(new Export(null, null, hide: ['y', 'z'])), | 463 .merge(new Export(null, null, hide: ['y', 'z'])), |
464 equals(new Export(null, null, hide: ['y']))); | 464 equals(new Export(null, null, hide: ['y']))); |
465 }); | 465 }); |
466 }); | 466 }); |
467 } | 467 } |
OLD | NEW |