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

Unified Diff: pkg/docgen/test/inherited_comments_test.dart

Issue 242363004: pkg/docgen: moved model classes into minilibs (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: cl nits Created 6 years, 8 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: pkg/docgen/test/inherited_comments_test.dart
diff --git a/pkg/docgen/test/inherited_comments_test.dart b/pkg/docgen/test/inherited_comments_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..2f229f94acd7bb4df92a1a69fd9b3fe9d134283c
--- /dev/null
+++ b/pkg/docgen/test/inherited_comments_test.dart
@@ -0,0 +1,49 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library docgen.test.inherited_comments;
+
+import 'dart:convert';
+import 'dart:io';
+
+import 'package:path/path.dart' as p;
+import 'package:scheduled_test/descriptor.dart' as d;
+import 'package:scheduled_test/scheduled_test.dart';
+
+import 'util.dart';
+import '../lib/docgen.dart' as dg;
+
+void main() {
+
+ setUp(() {
+ scheduleTempDir();
+ });
+
+ test('inherited comments', () {
+ schedule(() {
+ var codeDir = getMultiLibraryCodePath();
+ expect(FileSystemEntity.isDirectorySync(codeDir), isTrue);
+ return dg.docgen([codeDir], out: p.join(d.defaultRoot, 'docs'));
+ });
+
+ schedule(() {
+ var path = p.join(d.defaultRoot, 'docs', 'dart-core.Set.json');
+ var dartCoreSetJson = new File(path).readAsStringSync();
+
+ var dartCoreSet = JSON.decode(dartCoreSetJson) as Map<String, dynamic>;
+
+ var toListDetails = dartCoreSet['inheritedMethods']['methods']['toList']
+ as Map<String, dynamic>;
+
+ expect(toListDetails, containsPair('comment', _TO_LIST_COMMENT));
+ expect(toListDetails, containsPair('commentFrom', _TO_LIST_COMMENT_FROM));
+ });
+ });
+}
+
+const _TO_LIST_COMMENT = "<p>Creates a <a>dart-core.List</a> containing the "
+ "elements of this <a>dart-core.Iterable</a>.</p>\n<p>The elements are in "
+ "iteration order. The list is fixed-length\nif "
+ "<a>dart-core.Set.toList.growable</a> is false.</p>";
+const _TO_LIST_COMMENT_FROM = "dart-core.Iterable.toList";

Powered by Google App Engine
This is Rietveld 408576698