Chromium Code Reviews| Index: utils/tests/dartdoc/src/dartdoc_tests.dart |
| diff --git a/utils/dartdoc/test/dartdoc_tests.dart b/utils/tests/dartdoc/src/dartdoc_tests.dart |
| similarity index 76% |
| rename from utils/dartdoc/test/dartdoc_tests.dart |
| rename to utils/tests/dartdoc/src/dartdoc_tests.dart |
| index 88e4fc2d3f6ba886a59f9e687ab6019296d4aacb..6222648a8e1673e810053d3b57ab23a502dfe447 100644 |
| --- a/utils/dartdoc/test/dartdoc_tests.dart |
| +++ b/utils/tests/dartdoc/src/dartdoc_tests.dart |
| @@ -5,13 +5,13 @@ |
| /// Unit tests for dartdoc. |
| #library('dartdoc_tests'); |
| -#import('../dartdoc.dart'); |
| -#import('../markdown.dart', prefix: 'md'); |
| +#import('../../../dartdoc/dartdoc.dart'); |
| +#import('../../../dartdoc/markdown.dart', prefix: 'md'); |
| // TODO(rnystrom): Better path to unittest. |
| -#import('../../../client/testing/unittest/unittest_node.dart'); |
| -#import('../../../frog/lang.dart'); |
| -#import('../../../frog/file_system_node.dart'); |
| +#import('../../../../client/testing/unittest/unittest_node.dart'); |
| +#import('../../../../frog/lang.dart'); |
| +#import('../../../../frog/file_system_node.dart'); |
| main() { |
| var files = new NodeFileSystem(); |
| @@ -117,10 +117,19 @@ main() { |
| }); |
| }); |
| + // TODO(rnystrom): Disabling these for now. The problem is that loading |
| + // dummy.dart is sensitive to the location that dart was invoked from and |
|
Bill Hesse
2012/01/11 21:01:13
Can we add a bug reference here, to a bug that say
Bob Nystrom
2012/01/11 21:28:47
Done and filed already: https://code.google.com/p/
|
| + // not relative to *this* file like we'd like. That means these tests only |
| + // run correctly from one place. Unfortunately, test.py/test.dart runs this |
| + // from one directory and frog/presubmit.py runs it from another. |
| + /* |
| group('name reference', () { |
| var doc = new Dartdoc(); |
| - doc.document('test/dummy.dart'); |
| - var dummy = world.libraries['test/dummy.dart']; |
| + // TODO(rnystrom): The paths here are a bit strange. They're relative to |
| + // where test.dart happens to be invoked from. |
| + world.processDartScript('utils/tests/dartdoc/src/dummy.dart'); |
| + world.resolveAll(); |
| + var dummy = world.libraries['utils/tests/dartdoc/src/dummy.dart']; |
| var klass = dummy.findTypeByName('Class'); |
| var method = klass.getMember('method'); |
| @@ -133,37 +142,38 @@ main() { |
| test('to a member of the current type', () { |
| expect(render(doc.resolveNameReference('method', type: klass))). |
| - equals('<a href="../../dummy/Class.html#method" class="crossref">' + |
| + equals('<a class="crossref" href="../../dummy/Class.html#method">' + |
| 'method</a>'); |
| }); |
| test('to a property with only a getter links to the getter', () { |
| expect(render(doc.resolveNameReference('getterOnly', type: klass))). |
| - equals('<a href="../../dummy/Class.html#get:getterOnly" ' + |
| - 'class="crossref">getterOnly</a>'); |
| + equals('<a class="crossref" ' + |
| + 'href="../../dummy/Class.html#get:getterOnly">getterOnly</a>'); |
| }); |
| test('to a property with only a setter links to the setter', () { |
| expect(render(doc.resolveNameReference('setterOnly', type: klass))). |
| - equals('<a href="../../dummy/Class.html#set:setterOnly" ' + |
| - 'class="crossref">setterOnly</a>'); |
| + equals('<a class="crossref" ' + |
| + 'href="../../dummy/Class.html#set:setterOnly">setterOnly</a>'); |
| }); |
| test('to a property with a getter and setter links to the getter', () { |
| expect(render(doc.resolveNameReference('getterAndSetter', type: klass))). |
| - equals('<a href="../../dummy/Class.html#get:getterAndSetter" ' + |
| - 'class="crossref">getterAndSetter</a>'); |
| + equals('<a class="crossref" ' + |
| + 'href="../../dummy/Class.html#get:getterAndSetter">' + |
| + 'getterAndSetter</a>'); |
| }); |
| test('to a type in the current library', () { |
| expect(render(doc.resolveNameReference('Class', library: dummy))). |
| - equals('<a href="../../dummy/Class.html" class="crossref">Class</a>'); |
| + equals('<a class="crossref" href="../../dummy/Class.html">Class</a>'); |
| }); |
| test('to a top-level member in the current library', () { |
| expect(render(doc.resolveNameReference('topLevelMethod', |
| library: dummy))). |
| - equals('<a href="../../dummy.html#topLevelMethod" class="crossref">' + |
| + equals('<a class="crossref" href="../../dummy.html#topLevelMethod">' + |
| 'topLevelMethod</a>'); |
| }); |
| @@ -173,4 +183,5 @@ main() { |
| equals('<code>unknownName</code>'); |
| }); |
| }); |
| + */ |
| } |