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

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

Issue 135653009: Fix package docnames for select return types, and some more docgen refactoring. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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
« no previous file with comments | « pkg/docgen/test/multi_library_test.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:path/path.dart' as path; 5 import 'package:path/path.dart' as path;
6 import 'package:unittest/unittest.dart'; 6 import 'package:unittest/unittest.dart';
7 7
8 import '../lib/docgen.dart'; 8 import '../lib/docgen.dart';
9 9
10 const String DART_LIBRARY = ''' 10 const String DART_LIBRARY = '''
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 expect(variables.every((e) => e is Variable), isTrue); 97 expect(variables.every((e) => e is Variable), isTrue);
98 98
99 /// Testing fixReference 99 /// Testing fixReference
100 // Testing Doc comment for class [A]. 100 // Testing Doc comment for class [A].
101 var libraryMirror = mirrorSystem.libraries[testLibraryUri]; 101 var libraryMirror = mirrorSystem.libraries[testLibraryUri];
102 var classMirror = libraryMirror.classes.values.first; 102 var classMirror = libraryMirror.classes.values.first;
103 var classDocComment = library.fixReference('A').children.first.text; 103 var classDocComment = library.fixReference('A').children.first.text;
104 expect(classDocComment, 'test.A'); 104 expect(classDocComment, 'test.A');
105 105
106 // Test for linking to parameter [A] 106 // Test for linking to parameter [A]
107 var method = getDocgenObject(classMirror.methods['doThis']); 107 var method = Indexable.getDocgenObject(classMirror.methods['doThis']);
108 var methodParameterDocComment = method.fixReference( 108 var methodParameterDocComment = method.fixReference(
109 'A').children.first.text; 109 'A').children.first.text;
110 expect(methodParameterDocComment, 'test.A.doThis.A'); 110 expect(methodParameterDocComment, 'test.A.doThis.A');
111 111
112 // Testing trying to refer to doThis function 112 // Testing trying to refer to doThis function
113 var methodDocComment = method.fixReference( 113 var methodDocComment = method.fixReference(
114 'doThis').children.first.text; 114 'doThis').children.first.text;
115 expect(methodDocComment, 'test.A.doThis'); 115 expect(methodDocComment, 'test.A.doThis');
116 116
117 // Testing something with no reference 117 // Testing something with no reference
118 var libraryDocComment = method.fixReference('foobar').text; 118 var libraryDocComment = method.fixReference('foobar').text;
119 expect(libraryDocComment, 'foobar'); 119 expect(libraryDocComment, 'foobar');
120 })).whenComplete(() => temporaryDir.deleteSync(recursive: true)); 120 })).whenComplete(() => temporaryDir.deleteSync(recursive: true));
121 }); 121 });
122 }); 122 });
123 } 123 }
OLDNEW
« no previous file with comments | « pkg/docgen/test/multi_library_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698