Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1099)

Unified Diff: pkg/docgen/test/multi_library_test.dart

Issue 1364553002: remove docgen source and targets from build (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: remove scripts Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/docgen/test/multi_library_test.dart
diff --git a/pkg/docgen/test/multi_library_test.dart b/pkg/docgen/test/multi_library_test.dart
deleted file mode 100644
index ceda2762902a528ed19a3f2fdaf5cb66df7d7d92..0000000000000000000000000000000000000000
--- a/pkg/docgen/test/multi_library_test.dart
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright (c) 2014, 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.
-
-library single_library_test;
-
-import 'package:path/path.dart' as p;
-import 'package:unittest/unittest.dart';
-
-import '../lib/docgen.dart';
-import '../lib/src/exports/mirrors_util.dart' as dart2js_util;
-
-import 'util.dart';
-
-List<Uri> _writeLibFiles() {
- var codePath = getMultiLibraryCodePath();
-
- codePath = p.join(codePath, 'lib');
-
- return ['test_lib.dart', 'test_lib_bar.dart', 'test_lib_foo.dart']
- .map((name) => p.join(codePath, name))
- .map(p.toUri)
- .toList();
-}
-
-void main() {
- group('Generate docs for', () {
- test('multiple libraries.', () {
- var files = _writeLibFiles();
- return getMirrorSystem(files, false)
- .then((mirrorSystem) {
- var test_libraryUri = files[0];
- var library = new Library(mirrorSystem.libraries[test_libraryUri]);
-
- /// Testing fixReference
- // Testing Doc comment for class [B].
- var libraryMirror = mirrorSystem.libraries[test_libraryUri];
- var classDocComment = library.fixReference('B').children.first.text;
- expect(classDocComment, 'test_lib.B');
-
- // Test for linking to parameter [c]
- var importedLib = libraryMirror.libraryDependencies.firstWhere(
- (dep) => dep.isImport).targetLibrary;
- var aClassMirror =
- dart2js_util.classesOf(importedLib.declarations).first;
- expect(dart2js_util.qualifiedNameOf(aClassMirror),
- 'test_lib.foo.B');
- var exportedClass = getDocgenObject(aClassMirror, library);
- expect(exportedClass is Class, isTrue);
-
-
- var method = exportedClass.methods['doThis'];
- expect(method is Method, isTrue);
- var methodParameterDocComment = method.fixReference(
- 'c').children.first.text;
- expect(methodParameterDocComment, 'test_lib.B.doThis.c');
-
-
- expect(method.fixReference('A').children.first.text, 'test_lib.A');
- // Testing trying to refer to doThis function
- expect(method.fixReference('doThis').children.first.text,
- 'test_lib.B.doThis');
-
- // Testing trying to refer to doThis function
- expect(method.fixReference('doElse').children.first.text,
- 'test_lib.B.doElse');
-
-
- // Test a third library referencing another exported library in a
- // separate file.
- importedLib = libraryMirror.libraryDependencies.firstWhere(
- (dep) => dep.isImport &&
- dart2js_util.qualifiedNameOf(dep.targetLibrary) ==
- 'test_lib.bar').targetLibrary;
- aClassMirror = dart2js_util.classesOf(importedLib.declarations).first;
- expect(dart2js_util.qualifiedNameOf(aClassMirror),
- 'test_lib.bar.C');
- exportedClass = getDocgenObject(aClassMirror, library);
- expect(exportedClass is Class, isTrue);
- expect(exportedClass.docName, 'test_lib.C');
-
- methodParameterDocComment = exportedClass.fixReference(
- 'B').children.first.text;
- expect(methodParameterDocComment, 'test_lib.B');
-
- methodParameterDocComment = exportedClass.fixReference(
- 'testFunc').children.first.text;
- expect(methodParameterDocComment, 'test_lib.testFunc');
-
- });
- });
-
- test('multiple exported libraries.', () {
- var lib_file = p.toUri(p.join(getMultiLibraryCodePath(), 'lib',
- 'test_lib2.dart'));
- return getMirrorSystem([lib_file], false)
- .then((mirrorSystem) {
- var library = new Library(mirrorSystem.libraries[lib_file]);
-
- // Test that libraries do recursive exports correctly.
- expect(true, library.classes.keys.contains('Bar'));
- });
-
- });
- });
-}
« no previous file with comments | « pkg/docgen/test/multi_library_code/lib/test_lib_foo.dart ('k') | pkg/docgen/test/native_extensions_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698