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

Unified Diff: utils/tests/dartdoc/src/dartdoc_tests.dart

Issue 9147058: Hook up the dartdoc tests to test.py, test.dart, and frog/presubmit.py. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
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..a9f5bb0c650f3d1703ea1ad20aa6569c1a8060ff 100644
--- a/utils/dartdoc/test/dartdoc_tests.dart
+++ b/utils/tests/dartdoc/src/dartdoc_tests.dart
@@ -3,15 +3,15 @@
// BSD-style license that can be found in the LICENSE file.
/// Unit tests for dartdoc.
-#library('dartdoc_tests');
+#library('dartdoc_test');
-#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
Jennifer Messerly 2012/01/11 19:15:10 Up to you, but one thought I had here: instead of
Bob Nystrom 2012/01/11 21:28:47 Done: https://code.google.com/p/dart/issues/detail
+ // dummy.dart is sensitive to the location that dart was invoked from and
+ // 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>');
});
});
+ */
}

Powered by Google App Engine
This is Rietveld 408576698