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 @TestOn("vm") | |
6 library analyzer_cli.test.super_mixin; | 5 library analyzer_cli.test.super_mixin; |
7 | 6 |
8 import 'dart:io'; | 7 import 'dart:io'; |
9 | 8 |
10 import 'package:analyzer_cli/src/driver.dart' show Driver, errorSink, outSink; | 9 import 'package:analyzer_cli/src/driver.dart' show Driver, errorSink, outSink; |
11 import 'package:path/path.dart' as path; | 10 import 'package:path/path.dart' as path; |
12 import 'package:test/test.dart'; | 11 import 'package:unittest/unittest.dart'; |
13 | 12 |
14 import 'utils.dart'; | 13 import 'utils.dart'; |
15 | 14 |
16 /// End-to-end test for --supermixins. | 15 /// End-to-end test for --supermixins. |
17 /// | 16 /// |
18 /// Most super mixin tests are in Analyzer, but this verifies the option is | 17 /// Most super mixin tests are in Analyzer, but this verifies the option is |
19 /// working and producing extra errors as expected. | 18 /// working and producing extra errors as expected. |
20 /// | 19 /// |
21 /// Generally we don't want a lot of cases here as it requires spinning up a | 20 /// Generally we don't want a lot of cases here as it requires spinning up a |
22 /// full analysis context. | 21 /// full analysis context. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 test('produces no errors when option present', () async { | 57 test('produces no errors when option present', () async { |
59 var testPath = path.join(testDirectory, 'data/super_mixin_example.dart'); | 58 var testPath = path.join(testDirectory, 'data/super_mixin_example.dart'); |
60 new Driver().start(['--supermixin', testPath]); | 59 new Driver().start(['--supermixin', testPath]); |
61 | 60 |
62 expect(exitCode, 0); | 61 expect(exitCode, 0); |
63 var stdout = outSink.toString(); | 62 var stdout = outSink.toString(); |
64 expect(stdout, contains('No issues found')); | 63 expect(stdout, contains('No issues found')); |
65 }); | 64 }); |
66 }); | 65 }); |
67 } | 66 } |
OLD | NEW |