Chromium Code Reviews| Index: utils/dartdoc/test/dartdoc_tests.dart |
| diff --git a/utils/dartdoc/test/dartdoc_tests.dart b/utils/dartdoc/test/dartdoc_tests.dart |
| index 88e4fc2d3f6ba886a59f9e687ab6019296d4aacb..2ee581886f6f6e4f36d6af6578131bc38d98469d 100644 |
| --- a/utils/dartdoc/test/dartdoc_tests.dart |
| +++ b/utils/dartdoc/test/dartdoc_tests.dart |
| @@ -172,5 +172,30 @@ main() { |
| type: klass, member: method))). |
| equals('<code>unknownName</code>'); |
| }); |
| + |
|
Bob Nystrom
2012/01/10 00:40:41
Woo tests!
|
| + test('to an unknown name', () { |
| + expect(render(doc.resolveNameReference('unknownName', library: dummy, |
| + 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 href="../../dummy/Class.html#method" class="crossref">' + |
| + 'Class.method</a>'); |
| + }); |
| + |
| + test('to a constructor', () { |
| + expect(render(doc.resolveNameReference('new Class', library: dummy))). |
| + equals('<a href="../../dummy/Class.html#new:Class" class="crossref">' + |
| + 'new Class</a>'); |
| + }); |
| + |
| + test('to a named constructor', () { |
| + expect(render(doc.resolveNameReference('new Class.namedConstructor', |
| + library: dummy))). |
| + equals('<a href="../../dummy/Class.html#new:Class.namedConstructor" ' + |
| + 'class="crossref">new Class.namedConstructor</a>'); |
| + }); |
| }); |
| } |