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

Side by Side Diff: pkg/analyzer_cli/test/options_test.dart

Issue 1960263003: Allow zero analyzer args in build mode. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « pkg/analyzer_cli/lib/src/options.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 analyzer_cli.test.options; 5 library analyzer_cli.test.options;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'package:analyzer_cli/src/driver.dart'; 9 import 'package:analyzer_cli/src/driver.dart';
10 import 'package:analyzer_cli/src/options.dart'; 10 import 'package:analyzer_cli/src/options.dart';
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 ]); 250 ]);
251 expect(options.buildMode, isTrue); 251 expect(options.buildMode, isTrue);
252 expect(options.buildAnalysisOutput, '//path/to/output.analysis'); 252 expect(options.buildAnalysisOutput, '//path/to/output.analysis');
253 } 253 }
254 254
255 test_buildMode() { 255 test_buildMode() {
256 _parse(['--build-mode', 'package:p/foo.dart|/path/to/p/lib/foo.dart']); 256 _parse(['--build-mode', 'package:p/foo.dart|/path/to/p/lib/foo.dart']);
257 expect(options.buildMode, isTrue); 257 expect(options.buildMode, isTrue);
258 } 258 }
259 259
260 test_buildMode_allowsEmptyFileList() {
261 _parse(['--build-mode']);
262 expect(options.buildMode, isTrue);
263 expect(options.sourceFiles, isEmpty);
264 }
265
260 test_buildSummaryFallback() { 266 test_buildSummaryFallback() {
261 _parse([ 267 _parse([
262 '--build-mode', 268 '--build-mode',
263 '--build-summary-output=//path/to/output.sum', 269 '--build-summary-output=//path/to/output.sum',
264 '--build-summary-fallback', 270 '--build-summary-fallback',
265 'package:p/foo.dart|/path/to/p/lib/foo.dart' 271 'package:p/foo.dart|/path/to/p/lib/foo.dart'
266 ]); 272 ]);
267 expect(options.buildMode, isTrue); 273 expect(options.buildMode, isTrue);
268 expect(options.buildSummaryFallback, isTrue); 274 expect(options.buildSummaryFallback, isTrue);
269 } 275 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 'package:p/foo.dart|/path/to/p/lib/foo.dart' 325 'package:p/foo.dart|/path/to/p/lib/foo.dart'
320 ]); 326 ]);
321 expect(options.buildMode, isTrue); 327 expect(options.buildMode, isTrue);
322 expect(options.buildSuppressExitCode, isTrue); 328 expect(options.buildSuppressExitCode, isTrue);
323 } 329 }
324 330
325 void _parse(List<String> args) { 331 void _parse(List<String> args) {
326 options = CommandLineOptions.parse(args); 332 options = CommandLineOptions.parse(args);
327 } 333 }
328 } 334 }
OLDNEW
« no previous file with comments | « pkg/analyzer_cli/lib/src/options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698