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

Side by Side Diff: pkg/docgen/test/single_library_test.dart

Issue 19638009: "Reverting 25160" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« pkg/docgen/lib/docgen.dart ('K') | « pkg/docgen/lib/docgen.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library single_library_test; 1 library single_library_test;
2 2
3 import 'dart:io'; 3 import 'dart:io';
4 4
5 import 'package:unittest/unittest.dart'; 5 import 'package:unittest/unittest.dart';
6 6
7 import '../lib/docgen.dart'; 7 import '../lib/docgen.dart';
8 import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart'; 8 import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart';
9 9
10 main() { 10 main() {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 '''); 48 ''');
49 49
50 getMirrorSystem(['test.dart'],'', parseSdk: false) 50 getMirrorSystem(['test.dart'],'', parseSdk: false)
51 .then(expectAsync1((mirrorSystem) { 51 .then(expectAsync1((mirrorSystem) {
52 var testLibraryUri = currentDirectory.resolve('test.dart'); 52 var testLibraryUri = currentDirectory.resolve('test.dart');
53 var library = generateLibrary(mirrorSystem.libraries[testLibraryUri], 53 var library = generateLibrary(mirrorSystem.libraries[testLibraryUri],
54 includePrivate: true); 54 includePrivate: true);
55 expect(library is Library, isTrue); 55 expect(library is Library, isTrue);
56 56
57 var classTypes = library.classes.values; 57 var classes = library.classes.values;
58 expect(classTypes.every((e) => e is Map), isTrue);
59
60 var classes = [];
61 classTypes.forEach((e) => classes.addAll(e.values));
62 expect(classes.every((e) => e is Class), isTrue); 58 expect(classes.every((e) => e is Class), isTrue);
63 59
64 var classMethodTypes = []; 60 var classMethodTypes = [];
65 classes.forEach((e) => classMethodTypes.addAll(e.methods.values)); 61 classes.forEach((e) => classMethodTypes.addAll(e.methods.values));
66 expect(classMethodTypes.every((e) => e is Map), isTrue); 62 expect(classMethodTypes.every((e) => e is Map), isTrue);
67 63
68 var classMethods = []; 64 var classMethods = [];
69 classMethodTypes.forEach((e) => classMethods.addAll(e.values)); 65 classMethodTypes.forEach((e) => classMethods.addAll(e.values));
70 expect(classMethods.every((e) => e is Method), isTrue); 66 expect(classMethods.every((e) => e is Method), isTrue);
71 67
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // Testing something with no reference 109 // Testing something with no reference
114 var libraryDocComment = fixReference('foobar', libraryMirror, 110 var libraryDocComment = fixReference('foobar', libraryMirror,
115 classMirror, methodMirror).children.first.text; 111 classMirror, methodMirror).children.first.text;
116 expect(libraryDocComment == 'foobar', isTrue); 112 expect(libraryDocComment == 'foobar', isTrue);
117 113
118 file.deleteSync(); 114 file.deleteSync();
119 })); 115 }));
120 }); 116 });
121 }); 117 });
122 } 118 }
OLDNEW
« pkg/docgen/lib/docgen.dart ('K') | « pkg/docgen/lib/docgen.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698