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

Side by Side Diff: sdk/lib/_internal/dartdoc/test/dartdoc_test.dart

Issue 12448006: Lots of little changes for dartdoc/apidoc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/_internal/dartdoc/lib/universe_serializer.dart ('k') | utils/apidoc/apidoc.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Unit tests for doc. 5 /// Unit tests for doc.
6 library dartdocTests; 6 library dartdocTests;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:io'; 9 import 'dart:io';
10 import '../../../../../pkg/pathos/lib/path.dart' as path; 10 import '../../../../../pkg/pathos/lib/path.dart' as path;
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 final runArgs = [dartdoc]; 254 final runArgs = [dartdoc];
255 255
256 // Turn relative libraryPaths to absolute ones. 256 // Turn relative libraryPaths to absolute ones.
257 runArgs.addAll(libraryPaths 257 runArgs.addAll(libraryPaths
258 .map((e) => path.join(dd.scriptDir.toNativePath(), e))); 258 .map((e) => path.join(dd.scriptDir.toNativePath(), e)));
259 259
260 return Process.run(dartBin, runArgs); 260 return Process.run(dartBin, runArgs);
261 } 261 }
262 262
263 final _dartdocCompletionRegExp = 263 final _dartdocCompletionRegExp =
264 new RegExp(r'Documented (\d+) libraries, (\d+) types, and (\d+) members\.'); 264 new RegExp(r'Documentation complete -- documented (\d+) libraries, (\d+) types , and (\d+) members\.');
265 265
266 void _expectDocumented(String output, { int libCount, int typeCount, 266 void _expectDocumented(String output, { int libCount, int typeCount,
267 int memberCount}) { 267 int memberCount}) {
268 268
269 final completionMatches = _dartdocCompletionRegExp.allMatches(output) 269 final completionMatches = _dartdocCompletionRegExp.allMatches(output)
270 .toList(); 270 .toList();
271 271
272 expect(completionMatches, hasLength(1), 272 expect(completionMatches, hasLength(1),
273 reason: 'dartdoc output should contain one summary'); 273 reason: 'dartdoc output should contain one summary');
274 274
(...skipping 15 matching lines...) Expand all
290 } 290 }
291 } 291 }
292 292
293 293
294 validateDartdocMarkdown(String description, String markdown, 294 validateDartdocMarkdown(String description, String markdown,
295 String html) { 295 String html) {
296 var dartdoc = new dd.Dartdoc(); 296 var dartdoc = new dd.Dartdoc();
297 validate(description, markdown, html, linkResolver: dartdoc.dartdocResolver, 297 validate(description, markdown, html, linkResolver: dartdoc.dartdocResolver,
298 inlineSyntaxes: dartdoc.dartdocSyntaxes); 298 inlineSyntaxes: dartdoc.dartdocSyntaxes);
299 } 299 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/dartdoc/lib/universe_serializer.dart ('k') | utils/apidoc/apidoc.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698