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

Side by Side Diff: pkg/analysis_server/bin/fuzz.dart

Issue 677723002: Fix deprecation hints (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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/analysis_server/bin/dartdeps.dart ('k') | pkg/analysis_server/lib/driver.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) 2014, the Dart project authors. Please see the AUTHORS file 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 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:io'; 6 import 'dart:io';
7 7
8 import 'package:args/args.dart'; 8 import 'package:args/args.dart';
9 import 'package:matcher/matcher.dart'; 9 import 'package:matcher/matcher.dart';
10 import 'package:path/path.dart' as path; 10 import 'package:path/path.dart' as path;
11 11
12 import 'fuzz/server_manager.dart'; 12 import 'fuzz/server_manager.dart';
13 13
14 /** 14 /**
15 * Start analysis server as a separate process and use the stdio to communicate 15 * Start analysis server as a separate process and use the stdio to communicate
16 * with the server. 16 * with the server.
17 */ 17 */
18 void main(List<String> args) { 18 void main(List<String> args) {
19 new _FuzzTest().run(args); 19 new _FuzzTest().run(args);
20 } 20 }
21 21
22 /** 22 /**
23 * Instances of [_FuzzTest] launch and test an analysis server. 23 * Instances of [_FuzzTest] launch and test an analysis server.
24 * You must specify the location of the Dart SDK and the directory 24 * You must specify the location of the Dart SDK and the directory
25 * containing sources to be analyzed. 25 * containing sources to be analyzed.
26 */ 26 */
27 class _FuzzTest { 27 class _FuzzTest {
28 /**
29 * The name of the application that is used to start the fuzz tester.
30 */
31 static const BINARY_NAME = 'fuzz';
28 32
29 //TODO (danrubel) extract common behavior for use in multiple test scenarios 33 //TODO (danrubel) extract common behavior for use in multiple test scenarios
30 //TODO (danrubel) cleanup test to use async/await for better readability 34 //TODO (danrubel) cleanup test to use async/await for better readability
31 // VM flag --enable_async 35 // VM flag --enable_async
32 36
33 static const String DART_SDK_OPTION = 'dart-sdk'; 37 static const String DART_SDK_OPTION = 'dart-sdk';
34 static const String HELP_OPTION = 'help'; 38 static const String HELP_OPTION = 'help';
35 39
36 File serverSnapshot; 40 File serverSnapshot;
37 Directory appDir; 41 Directory appDir;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 155 }
152 156
153 void _printAnalysisSummary(AnalysisResults results) { 157 void _printAnalysisSummary(AnalysisResults results) {
154 print( 158 print(
155 'Found ${results.errorCount} errors, ${results.warningCount} warnings,' 159 'Found ${results.errorCount} errors, ${results.warningCount} warnings,'
156 ' and ${results.hintCount} hints in $results.elapsed'); 160 ' and ${results.hintCount} hints in $results.elapsed');
157 } 161 }
158 162
159 /// Print information about how to use the server. 163 /// Print information about how to use the server.
160 void _printUsage(ArgParser parser) { 164 void _printUsage(ArgParser parser) {
161 print('Usage: analyzer [flags] <application_directory>'); 165 print('Usage: $BINARY_NAME [flags] <application_directory>');
162 print(''); 166 print('');
163 print('Supported flags are:'); 167 print('Supported flags are:');
164 print(parser.getUsage()); 168 print(parser.usage);
165 } 169 }
166 } 170 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/bin/dartdeps.dart ('k') | pkg/analysis_server/lib/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698