OLD | NEW |
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.driver; | 5 library analyzer_cli.test.driver; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 | 9 |
10 import 'package:analyzer/error/error.dart'; | 10 import 'package:analyzer/error/error.dart'; |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 void createTests(String designator, String optionsFileName) { | 335 void createTests(String designator, String optionsFileName) { |
336 group('build-mode - $designator', () { | 336 group('build-mode - $designator', () { |
337 // Shared driver command. | 337 // Shared driver command. |
338 Future<Null> doDrive(String filePath, | 338 Future<Null> doDrive(String filePath, |
339 {List<String> additionalArgs: const []}) async { | 339 {List<String> additionalArgs: const []}) async { |
340 await drive('file:///test_file.dart|$filePath', | 340 await drive('file:///test_file.dart|$filePath', |
341 args: [ | 341 args: [ |
342 '--dart-sdk', | 342 '--dart-sdk', |
343 findSdkDirForSummaries(), | 343 findSdkDirForSummaries(), |
344 '--build-mode', | 344 '--build-mode', |
345 '--machine' | 345 '--format=machine' |
346 ]..addAll(additionalArgs), | 346 ]..addAll(additionalArgs), |
347 options: 'data/options_tests_project/$optionsFileName'); | 347 options: 'data/options_tests_project/$optionsFileName'); |
348 } | 348 } |
349 | 349 |
350 test('no stats', () async { | 350 test('no stats', () async { |
351 await doDrive('data/test_file.dart'); | 351 await doDrive('data/test_file.dart'); |
352 // Should not print stat summary. | 352 // Should not print stat summary. |
353 expect(outSink.toString(), isEmpty); | 353 expect(outSink.toString(), isEmpty); |
354 expect(errorSink.toString(), isEmpty); | 354 expect(errorSink.toString(), isEmpty); |
355 expect(exitCode, 0); | 355 expect(exitCode, 0); |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 | 527 |
528 ErrorProcessor processorFor(AnalysisError error) => | 528 ErrorProcessor processorFor(AnalysisError error) => |
529 processors.firstWhere((p) => p.appliesTo(error)); | 529 processors.firstWhere((p) => p.appliesTo(error)); |
530 | 530 |
531 class TestSource implements Source { | 531 class TestSource implements Source { |
532 TestSource(); | 532 TestSource(); |
533 | 533 |
534 @override | 534 @override |
535 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 535 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
536 } | 536 } |
OLD | NEW |