| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 test('not fatal warnings', () async { | 82 test('not fatal warnings', () async { |
| 83 await drive('data/file_with_warning.dart'); | 83 await drive('data/file_with_warning.dart'); |
| 84 expect(exitCode, 0); | 84 expect(exitCode, 0); |
| 85 }); | 85 }); |
| 86 | 86 |
| 87 test('fatal warnings', () async { | 87 test('fatal warnings', () async { |
| 88 await drive('data/file_with_warning.dart', args: ['--fatal-warnings']); | 88 await drive('data/file_with_warning.dart', args: ['--fatal-warnings']); |
| 89 expect(exitCode, 3); | 89 expect(exitCode, 3); |
| 90 }); | 90 }); |
| 91 | 91 |
| 92 test('not parse enableAssertInitializer', () async { |
| 93 await drive('data/file_with_assert_initializers.dart', |
| 94 args: ['--enable-assert-initializers']); |
| 95 expect(exitCode, 0); |
| 96 }); |
| 97 |
| 92 test('missing options file', () async { | 98 test('missing options file', () async { |
| 93 await drive('data/test_file.dart', options: 'data/NO_OPTIONS_HERE'); | 99 await drive('data/test_file.dart', options: 'data/NO_OPTIONS_HERE'); |
| 94 expect(exitCode, 3); | 100 expect(exitCode, 3); |
| 95 }); | 101 }); |
| 96 | 102 |
| 97 test('missing dart file', () async { | 103 test('missing dart file', () async { |
| 98 await drive('data/NO_DART_FILE_HERE.dart'); | 104 await drive('data/NO_DART_FILE_HERE.dart'); |
| 99 expect(exitCode, 3); | 105 expect(exitCode, 3); |
| 100 }); | 106 }); |
| 101 | 107 |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 | 612 |
| 607 class TestSource implements Source { | 613 class TestSource implements Source { |
| 608 TestSource(); | 614 TestSource(); |
| 609 | 615 |
| 610 @override | 616 @override |
| 611 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 617 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
| 612 } | 618 } |
| 613 | 619 |
| 614 /// Normalize text with bullets. | 620 /// Normalize text with bullets. |
| 615 String _bulletToDash(item) => '$item'.replaceAll('•', '-'); | 621 String _bulletToDash(item) => '$item'.replaceAll('•', '-'); |
| OLD | NEW |