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

Side by Side Diff: pkg/analysis_server/test/analysis/notification_analysis_options_test.dart

Issue 2863593004: Remove the non-driver versions of several tests (Closed)
Patch Set: Created 3 years, 7 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
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 test.analysis.notification_analysis_options_test;
6
7 import 'package:analysis_server/protocol/protocol.dart'; 5 import 'package:analysis_server/protocol/protocol.dart';
8 import 'package:analysis_server/protocol/protocol_generated.dart' 6 import 'package:analysis_server/protocol/protocol_generated.dart'
9 hide AnalysisOptions; 7 hide AnalysisOptions;
10 import 'package:analysis_server/src/constants.dart'; 8 import 'package:analysis_server/src/constants.dart';
11 import 'package:analysis_server/src/domain_analysis.dart'; 9 import 'package:analysis_server/src/domain_analysis.dart';
12 import 'package:analyzer/src/generated/engine.dart'; 10 import 'package:analyzer/src/generated/engine.dart';
13 import 'package:linter/src/rules.dart'; 11 import 'package:linter/src/rules.dart';
14 import 'package:test/test.dart'; 12 import 'package:test/test.dart';
15 import 'package:test_reflective_loader/test_reflective_loader.dart'; 13 import 'package:test_reflective_loader/test_reflective_loader.dart';
16 14
17 import '../analysis_abstract.dart'; 15 import '../analysis_abstract.dart';
18 import '../mocks.dart'; 16 import '../mocks.dart';
19 17
20 main() { 18 main() {
21 defineReflectiveSuite(() { 19 defineReflectiveSuite(() {
22 defineReflectiveTests(NewAnalysisOptionsFileNotificationTest); 20 defineReflectiveTests(NewAnalysisOptionsFileNotificationTest);
23 defineReflectiveTests(OldAnalysisOptionsFileNotificationTest); 21 defineReflectiveTests(OldAnalysisOptionsFileNotificationTest);
24 defineReflectiveTests(NewAnalysisOptionsFileNotificationTest_Driver);
25 defineReflectiveTests(OldAnalysisOptionsFileNotificationTest_Driver);
26 }); 22 });
27 } 23 }
28 24
29 abstract class AnalysisOptionsFileNotificationTest 25 abstract class AnalysisOptionsFileNotificationTest
30 extends AbstractAnalysisTest { 26 extends AbstractAnalysisTest {
31 Map<String, List<AnalysisError>> filesErrors = {}; 27 Map<String, List<AnalysisError>> filesErrors = {};
32 28
33 final testSource = ''' 29 final testSource = '''
34 main() { 30 main() {
35 var x = ''; 31 var x = '';
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 65
70 void setStrongMode(bool isSet) { 66 void setStrongMode(bool isSet) {
71 addOptionsFile(''' 67 addOptionsFile('''
72 analyzer: 68 analyzer:
73 strong-mode: $isSet 69 strong-mode: $isSet
74 '''); 70 ''');
75 } 71 }
76 72
77 @override 73 @override
78 void setUp() { 74 void setUp() {
75 enableNewAnalysisDriver = true;
76 generateSummaryFiles = true;
79 registerLintRules(); 77 registerLintRules();
80 super.setUp(); 78 super.setUp();
81 server.handlers = [new AnalysisDomainHandler(server)]; 79 server.handlers = [new AnalysisDomainHandler(server)];
82 } 80 }
83 81
84 @override 82 @override
85 void tearDown() { 83 void tearDown() {
86 filesErrors[optionsFilePath] = []; 84 filesErrors[optionsFilePath] = [];
87 filesErrors[testFile] = []; 85 filesErrors[testFile] = [];
88 super.tearDown(); 86 super.tearDown();
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 } 331 }
334 332
335 @reflectiveTest 333 @reflectiveTest
336 class NewAnalysisOptionsFileNotificationTest 334 class NewAnalysisOptionsFileNotificationTest
337 extends AnalysisOptionsFileNotificationTest { 335 extends AnalysisOptionsFileNotificationTest {
338 @override 336 @override
339 String get optionsFilePath => '$projectPath/analysis_options.yaml'; 337 String get optionsFilePath => '$projectPath/analysis_options.yaml';
340 } 338 }
341 339
342 @reflectiveTest 340 @reflectiveTest
343 class NewAnalysisOptionsFileNotificationTest_Driver
344 extends NewAnalysisOptionsFileNotificationTest {
345 @override
346 void setUp() {
347 enableNewAnalysisDriver = true;
348 generateSummaryFiles = true;
349 super.setUp();
350 }
351 }
352
353 @reflectiveTest
354 class OldAnalysisOptionsFileNotificationTest 341 class OldAnalysisOptionsFileNotificationTest
355 extends AnalysisOptionsFileNotificationTest { 342 extends AnalysisOptionsFileNotificationTest {
356 @override 343 @override
357 String get optionsFilePath => '$projectPath/.analysis_options'; 344 String get optionsFilePath => '$projectPath/.analysis_options';
358 } 345 }
359
360 @reflectiveTest
361 class OldAnalysisOptionsFileNotificationTest_Driver
362 extends OldAnalysisOptionsFileNotificationTest {
363 @override
364 void setUp() {
365 enableNewAnalysisDriver = true;
366 generateSummaryFiles = true;
367 super.setUp();
368 }
369 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698