| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 // VMOptions=--compile-all --error_on_bad_type --error_on_bad_override |
| 5 |
| 6 import 'package:observatory/service_io.dart'; |
| 7 import 'package:observatory/debugger.dart'; |
| 8 import 'package:unittest/unittest.dart'; |
| 9 import 'test_helper.dart'; |
| 10 import 'dart:async'; |
| 11 |
| 12 export 'dart:collection'; |
| 13 import 'dart:mirrors' as mirrors; |
| 14 import 'dart:convert' deferred as convert; |
| 15 |
| 16 var tests = [ |
| 17 |
| 18 (Isolate isolate) async { |
| 19 var lib = await isolate.rootLibrary.load(); |
| 20 |
| 21 importOf(String uri) { |
| 22 return lib.dependencies.singleWhere((dep) => dep.target.uri == uri); |
| 23 } |
| 24 |
| 25 expect(importOf("dart:collection").isImport, isFalse); |
| 26 expect(importOf("dart:collection").isExport, isTrue); |
| 27 expect(importOf("dart:collection").isDeferred, isFalse); |
| 28 expect(importOf("dart:collection").prefix, equals(null)); |
| 29 |
| 30 expect(importOf("dart:mirrors").isImport, isTrue); |
| 31 expect(importOf("dart:mirrors").isExport, isFalse); |
| 32 expect(importOf("dart:mirrors").isDeferred, isFalse); |
| 33 expect(importOf("dart:mirrors").prefix, equals("mirrors")); |
| 34 |
| 35 expect(importOf("dart:convert").isImport, isTrue); |
| 36 expect(importOf("dart:convert").isExport, isFalse); |
| 37 expect(importOf("dart:convert").isDeferred, isTrue); |
| 38 expect(importOf("dart:convert").prefix, equals("convert")); |
| 39 }, |
| 40 ]; |
| 41 |
| 42 main(args) => runIsolateTests(args, tests); |
| OLD | NEW |