Chromium Code Reviews| 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:io'; | 7 import 'dart:io'; |
| 8 | 8 |
| 9 import 'package:analyzer/plugin/options.dart'; | 9 import 'package:analyzer/plugin/options.dart'; |
| 10 import 'package:analyzer/source/analysis_options_provider.dart'; | 10 import 'package:analyzer/source/analysis_options_provider.dart'; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 59 TestProcessor processor = new TestProcessor(); | 59 TestProcessor processor = new TestProcessor(); |
| 60 driver.userDefinedPlugins = [new TestPlugin(processor)]; | 60 driver.userDefinedPlugins = [new TestPlugin(processor)]; |
| 61 driver.start([ | 61 driver.start([ |
| 62 '--options', | 62 '--options', |
| 63 path.join(testDirectory, 'data/test_options.yaml'), | 63 path.join(testDirectory, 'data/test_options.yaml'), |
| 64 path.join(testDirectory, 'data/test_file.dart') | 64 path.join(testDirectory, 'data/test_file.dart') |
| 65 ]); | 65 ]); |
| 66 expect(processor.options['test_plugin'], isNotNull); | 66 expect(processor.options['test_plugin'], isNotNull); |
| 67 expect(processor.exception, isNull); | 67 expect(processor.exception, isNull); |
| 68 }); | 68 }); |
| 69 test('todos', () { | |
| 70 drive('data/file_with_todo.dart'); | |
|
Brian Wilkerson
2016/04/08 13:58:52
Does this file already exist, or did you forget to
pquitslund
2016/04/08 15:53:56
Done.
| |
| 71 expect(outSink.toString().contains('[info]'), isFalse); | |
| 72 }); | |
| 69 }); | 73 }); |
| 70 | 74 |
| 71 group('exit codes', () { | 75 group('exit codes', () { |
| 72 test('fatal hints', () { | 76 test('fatal hints', () { |
| 73 drive('data/file_with_hint.dart', args: ['--fatal-hints']); | 77 drive('data/file_with_hint.dart', args: ['--fatal-hints']); |
| 74 expect(exitCode, 3); | 78 expect(exitCode, 3); |
| 75 }); | 79 }); |
| 76 | 80 |
| 77 test('not fatal hints', () { | 81 test('not fatal hints', () { |
| 78 drive('data/file_with_hint.dart'); | 82 drive('data/file_with_hint.dart'); |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 505 this.options = options; | 509 this.options = options; |
| 506 } | 510 } |
| 507 } | 511 } |
| 508 | 512 |
| 509 class TestSource implements Source { | 513 class TestSource implements Source { |
| 510 TestSource(); | 514 TestSource(); |
| 511 | 515 |
| 512 @override | 516 @override |
| 513 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 517 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
| 514 } | 518 } |
| OLD | NEW |