| Index: runtime/observatory/tests/service/library_dependency_test.dart
|
| diff --git a/runtime/observatory/tests/service/library_dependency_test.dart b/runtime/observatory/tests/service/library_dependency_test.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4547e966f80d5fcf03a181ab28ba1285c4cba791
|
| --- /dev/null
|
| +++ b/runtime/observatory/tests/service/library_dependency_test.dart
|
| @@ -0,0 +1,42 @@
|
| +// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +// VMOptions=--compile-all --error_on_bad_type --error_on_bad_override
|
| +
|
| +import 'package:observatory/service_io.dart';
|
| +import 'package:observatory/debugger.dart';
|
| +import 'package:unittest/unittest.dart';
|
| +import 'test_helper.dart';
|
| +import 'dart:async';
|
| +
|
| +export 'dart:collection';
|
| +import 'dart:mirrors' as mirrors;
|
| +import 'dart:convert' deferred as convert;
|
| +
|
| +var tests = [
|
| +
|
| +(Isolate isolate) async {
|
| + var lib = await isolate.rootLibrary.load();
|
| +
|
| + importOf(String uri) {
|
| + return lib.dependencies.singleWhere((dep) => dep.target.uri == uri);
|
| + }
|
| +
|
| + expect(importOf("dart:collection").isImport, isFalse);
|
| + expect(importOf("dart:collection").isExport, isTrue);
|
| + expect(importOf("dart:collection").isDeferred, isFalse);
|
| + expect(importOf("dart:collection").prefix, equals(null));
|
| +
|
| + expect(importOf("dart:mirrors").isImport, isTrue);
|
| + expect(importOf("dart:mirrors").isExport, isFalse);
|
| + expect(importOf("dart:mirrors").isDeferred, isFalse);
|
| + expect(importOf("dart:mirrors").prefix, equals("mirrors"));
|
| +
|
| + expect(importOf("dart:convert").isImport, isTrue);
|
| + expect(importOf("dart:convert").isExport, isFalse);
|
| + expect(importOf("dart:convert").isDeferred, isTrue);
|
| + expect(importOf("dart:convert").prefix, equals("convert"));
|
| +},
|
| +];
|
| +
|
| +main(args) => runIsolateTests(args, tests);
|
|
|