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

Side by Side Diff: pkg/docgen/test/only_lib_content_in_pkg_test.dart

Issue 203753005: pkg/docgen: test fixes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « pkg/docgen/test/multi_library_test.dart ('k') | pkg/docgen/test/single_library_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
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.
4
5 library docgen.test.only_lib_content_in_pkg;
6
7 import 'dart:io';
8
9 import 'package:path/path.dart' as p;
10 import 'package:scheduled_test/descriptor.dart' as d;
11 import 'package:scheduled_test/scheduled_test.dart';
12 import 'package:unittest/matcher.dart';
13
14 import '../lib/docgen.dart' as dg;
15 import 'util.dart';
16
17 void main() {
18
19 setUp(() {
20 scheduleTempDir();
21 });
22
23 test('exclude non-lib code from package docs', () {
24 schedule(() {
25 var thisScript = Platform.script;
26 var thisPath = p.fromUri(thisScript);
27 expect(p.basename(thisPath), 'only_lib_content_in_pkg_test.dart');
28 expect(p.dirname(thisPath), endsWith('test'));
29
30
31 var codeDir = p.normalize(p.join(thisPath, '..', '..'));
32 print(codeDir);
33 expect(FileSystemEntity.isDirectorySync(codeDir), isTrue);
34 return dg.docgen(['$codeDir/'], out: p.join(d.defaultRoot, 'docs'));
35 });
36
37 d.dir('docs', [
38 d.dir('docgen', [
39 d.matcherFile('docgen.json', isJsonMap)
40 ]),
41 d.matcherFile('index.json', isJsonMap),
42 d.matcherFile('index.txt', hasSortedLines),
43 d.matcherFile('library_list.json', isJsonMap),
44 d.nothing('test_lib.json'),
45 d.nothing('test_lib-bar.json'),
46 d.nothing('test_lib-foo.json')
47 ]).validate();
48
49 });
50 }
OLDNEW
« no previous file with comments | « pkg/docgen/test/multi_library_test.dart ('k') | pkg/docgen/test/single_library_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698