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

Side by Side Diff: dart/tests/compiler/dart2js/analyze_api_test.dart

Issue 11740025: Add dart2js option to select library categories. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix dartdoc and some unit tests Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library analyze_api; 5 library analyze_api;
6 6
7 import 'dart:uri'; 7 import 'dart:uri';
8 import 'dart:io'; 8 import 'dart:io';
9 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api; 9 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api;
10 import '../../../sdk/lib/_internal/compiler/implementation/apiimpl.dart'; 10 import '../../../sdk/lib/_internal/compiler/implementation/apiimpl.dart';
(...skipping 25 matching lines...) Expand all
36 Uri currentWorkingDirectory = getCurrentDirectory(); 36 Uri currentWorkingDirectory = getCurrentDirectory();
37 var libraryRoot = currentWorkingDirectory.resolve('sdk/'); 37 var libraryRoot = currentWorkingDirectory.resolve('sdk/');
38 var uriList = new List<Uri>(); 38 var uriList = new List<Uri>();
39 LIBRARIES.forEach((String name, LibraryInfo info) { 39 LIBRARIES.forEach((String name, LibraryInfo info) {
40 if (info.documented) { 40 if (info.documented) {
41 uriList.add(new Uri.fromComponents(scheme: 'dart', path: name)); 41 uriList.add(new Uri.fromComponents(scheme: 'dart', path: name));
42 } 42 }
43 }); 43 });
44 var provider = new SourceFileProvider(); 44 var provider = new SourceFileProvider();
45 var handler = new CollectingDiagnosticHandler(provider); 45 var handler = new CollectingDiagnosticHandler(provider);
46 handler.verbose = true;
47 var compiler = new Compiler( 46 var compiler = new Compiler(
48 provider.readStringFromUri, 47 provider.readStringFromUri,
49 handler.diagnosticHandler, 48 handler.diagnosticHandler,
50 libraryRoot, libraryRoot, 49 libraryRoot, libraryRoot,
51 <String>['--analyze-only', '--analyze-all']); 50 <String>['--analyze-only', '--analyze-all',
51 '--categories=Client,Server']);
52 compiler.librariesToAnalyzeWhenRun = uriList; 52 compiler.librariesToAnalyzeWhenRun = uriList;
53 compiler.run(null); 53 compiler.run(null);
54 Expect.isFalse(handler.hasWarnings); 54 Expect.isFalse(handler.hasWarnings);
55 Expect.isFalse(handler.hasErrors); 55 Expect.isFalse(handler.hasErrors);
56 } 56 }
OLDNEW
« no previous file with comments | « dart/sdk/lib/_internal/dartdoc/lib/dartdoc.dart ('k') | dart/tests/compiler/dart2js/dart_backend_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698