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

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

Issue 11828043: Extend compiler API to support multiple outputs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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 | « dart/sdk/lib/_internal/compiler/implementation/source_file_provider.dart ('k') | no next file » | 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) 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 27 matching lines...) Expand all
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 var compiler = new Compiler( 46 var compiler = new Compiler(
47 provider.readStringFromUri, 47 provider.readStringFromUri,
48 null,
48 handler.diagnosticHandler, 49 handler.diagnosticHandler,
49 libraryRoot, libraryRoot, 50 libraryRoot, libraryRoot,
50 <String>['--analyze-only', '--analyze-all', 51 <String>['--analyze-only', '--analyze-all',
51 '--categories=Client,Server']); 52 '--categories=Client,Server']);
52 compiler.librariesToAnalyzeWhenRun = uriList; 53 compiler.librariesToAnalyzeWhenRun = uriList;
53 compiler.run(null); 54 compiler.run(null);
54 Expect.isFalse(handler.hasWarnings); 55 Expect.isFalse(handler.hasWarnings);
55 Expect.isFalse(handler.hasErrors); 56 Expect.isFalse(handler.hasErrors);
56 } 57 }
OLDNEW
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/source_file_provider.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698