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

Side by Side Diff: utils/tests/dartdoc/src/dartdoc_tests.dart

Issue 9146016: Add the ability to link to members and constructors of other classes in Dartdoc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Get tests running again. Created 8 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 | « utils/dartdoc/files.dart ('k') | utils/tests/dartdoc/src/dummy.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Unit tests for dartdoc. 5 /// Unit tests for dartdoc.
6 #library('dartdoc_tests'); 6 #library('dartdoc_tests');
7 7
8 #import('../../../dartdoc/dartdoc.dart'); 8 #import('../../../dartdoc/dartdoc.dart');
9 #import('../../../dartdoc/markdown.dart', prefix: 'md'); 9 #import('../../../dartdoc/markdown.dart', prefix: 'md');
10 10
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 library: dummy))). 185 library: dummy))).
186 equals('<a class="crossref" href="../../dummy.html#topLevelMethod">' + 186 equals('<a class="crossref" href="../../dummy.html#topLevelMethod">' +
187 'topLevelMethod</a>'); 187 'topLevelMethod</a>');
188 }); 188 });
189 189
190 test('to an unknown name', () { 190 test('to an unknown name', () {
191 expect(render(doc.resolveNameReference('unknownName', library: dummy, 191 expect(render(doc.resolveNameReference('unknownName', library: dummy,
192 type: klass, member: method))). 192 type: klass, member: method))).
193 equals('<code>unknownName</code>'); 193 equals('<code>unknownName</code>');
194 }); 194 });
195
196 test('to a member of another class', () {
197 expect(render(doc.resolveNameReference('Class.method', library: dummy))).
198 equals('<a class="crossref" href="../../dummy/Class.html#method">' +
199 'Class.method</a>');
200 });
201
202 test('to a constructor', () {
203 expect(render(doc.resolveNameReference('new Class', library: dummy))).
204 equals('<a class="crossref" href="../../dummy/Class.html#new:Class">' +
205 'new Class</a>');
206 });
207
208 test('to a named constructor', () {
209 expect(render(doc.resolveNameReference('new Class.namedConstructor',
210 library: dummy))).
211 equals('<a class="crossref" ' +
212 'href="../../dummy/Class.html#new:Class.namedConstructor">new ' +
213 'Class.namedConstructor</a>');
214 });
195 }); 215 });
196 } 216 }
OLDNEW
« no previous file with comments | « utils/dartdoc/files.dart ('k') | utils/tests/dartdoc/src/dummy.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698