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

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

Issue 2963323002: Add analytics to analyzer-cli and analysis server. (Closed)
Patch Set: update from review comments Created 3 years, 5 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/test/strong_mode_test.dart ('k') | pkg/telemetry/BUILD.gn » ('j') | 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.super_mixin; 5 library analyzer_cli.test.super_mixin;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'package:analyzer_cli/src/ansi.dart' as ansi; 9 import 'package:analyzer_cli/src/ansi.dart' as ansi;
10 import 'package:analyzer_cli/src/driver.dart' show Driver, errorSink, outSink; 10 import 'package:analyzer_cli/src/driver.dart' show Driver, errorSink, outSink;
(...skipping 25 matching lines...) Expand all
36 36
37 tearDown(() { 37 tearDown(() {
38 outSink = savedOutSink; 38 outSink = savedOutSink;
39 errorSink = savedErrorSink; 39 errorSink = savedErrorSink;
40 exitCode = savedExitCode; 40 exitCode = savedExitCode;
41 ansi.runningTests = false; 41 ansi.runningTests = false;
42 }); 42 });
43 43
44 test('produces errors when option absent', () async { 44 test('produces errors when option absent', () async {
45 var testPath = path.join(testDirectory, 'data/super_mixin_example.dart'); 45 var testPath = path.join(testDirectory, 'data/super_mixin_example.dart');
46 await new Driver().start([testPath]); 46 await new Driver(isTesting: true).start([testPath]);
47 47
48 expect(exitCode, 3); 48 expect(exitCode, 3);
49 var stdout = outSink.toString(); 49 var stdout = outSink.toString();
50 expect( 50 expect(
51 stdout, 51 stdout,
52 contains( 52 contains(
53 "error • The class 'C' can't be used as a mixin because it extends a class other than Object")); 53 "error • The class 'C' can't be used as a mixin because it extends a class other than Object"));
54 expect( 54 expect(
55 stdout, 55 stdout,
56 contains( 56 contains(
57 "error • The class 'C' can't be used as a mixin because it referen ces 'super'")); 57 "error • The class 'C' can't be used as a mixin because it referen ces 'super'"));
58 expect(stdout, contains('2 errors found.')); 58 expect(stdout, contains('2 errors found.'));
59 expect(errorSink.toString(), ''); 59 expect(errorSink.toString(), '');
60 }); 60 });
61 61
62 test('produces no errors when option present', () async { 62 test('produces no errors when option present', () async {
63 var testPath = path.join(testDirectory, 'data/super_mixin_example.dart'); 63 var testPath = path.join(testDirectory, 'data/super_mixin_example.dart');
64 await new Driver().start(['--supermixin', testPath]); 64 await new Driver(isTesting: true).start(['--supermixin', testPath]);
65 65
66 expect(exitCode, 0); 66 expect(exitCode, 0);
67 var stdout = outSink.toString(); 67 var stdout = outSink.toString();
68 expect(stdout, contains('No issues found')); 68 expect(stdout, contains('No issues found'));
69 }); 69 });
70 }); 70 });
71 } 71 }
OLDNEW
« no previous file with comments | « pkg/analyzer_cli/test/strong_mode_test.dart ('k') | pkg/telemetry/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698