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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/dartdoc/files.dart ('k') | utils/tests/dartdoc/src/dummy.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/dartdoc/src/dartdoc_tests.dart
diff --git a/utils/tests/dartdoc/src/dartdoc_tests.dart b/utils/tests/dartdoc/src/dartdoc_tests.dart
index 49570d35f8faee08146e5e202754dc512caa0b5f..aa9018a35b77ec728a874511ea01d330f7d6b867 100644
--- a/utils/tests/dartdoc/src/dartdoc_tests.dart
+++ b/utils/tests/dartdoc/src/dartdoc_tests.dart
@@ -192,5 +192,25 @@ main() {
type: klass, member: method))).
equals('<code>unknownName</code>');
});
+
+ test('to a member of another class', () {
+ expect(render(doc.resolveNameReference('Class.method', library: dummy))).
+ equals('<a class="crossref" href="../../dummy/Class.html#method">' +
+ 'Class.method</a>');
+ });
+
+ test('to a constructor', () {
+ expect(render(doc.resolveNameReference('new Class', library: dummy))).
+ equals('<a class="crossref" href="../../dummy/Class.html#new:Class">' +
+ 'new Class</a>');
+ });
+
+ test('to a named constructor', () {
+ expect(render(doc.resolveNameReference('new Class.namedConstructor',
+ library: dummy))).
+ equals('<a class="crossref" ' +
+ 'href="../../dummy/Class.html#new:Class.namedConstructor">new ' +
+ 'Class.namedConstructor</a>');
+ });
});
}
« 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