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

Unified Diff: pkg/analysis_server/test/analysis/notification_analysis_options_test.dart

Issue 1975963002: Support the name analysis_options.yaml for analysis options files (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/test/analysis/notification_analysis_options_test.dart
diff --git a/pkg/analysis_server/test/analysis/notification_analysis_options_test.dart b/pkg/analysis_server/test/analysis/notification_analysis_options_test.dart
index e8cf7c4b3bcb0fdc620bf0764d78835636017ebf..b2d1addfcfb2379961a7e404424111dda4e73b9c 100644
--- a/pkg/analysis_server/test/analysis/notification_analysis_options_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_analysis_options_test.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library test.analysis.notification.analysis_options;
+library test.analysis.notification_analysis_options_test;
import 'package:analysis_server/plugin/protocol/protocol.dart';
import 'package:analysis_server/src/constants.dart';
@@ -18,11 +18,12 @@ import '../utils.dart';
main() {
initializeTestEnvironment();
- defineReflectiveTests(AnalysisOptionsFileNotificationTest);
+ defineReflectiveTests(NewAnalysisOptionsFileNotificationTest);
+ defineReflectiveTests(OldAnalysisOptionsFileNotificationTest);
}
-@reflectiveTest
-class AnalysisOptionsFileNotificationTest extends AbstractAnalysisTest {
+abstract class AnalysisOptionsFileNotificationTest
+ extends AbstractAnalysisTest {
Map<String, List<AnalysisError>> filesErrors = {};
final testSource = '''
@@ -36,7 +37,7 @@ main() {
List<AnalysisError> get optionsFileErrors => filesErrors[optionsFilePath];
- String get optionsFilePath => '$projectPath/.analysis_options';
+ String get optionsFilePath;
AnalysisContext get testContext => server.getContainingContext(testFile);
@@ -306,3 +307,15 @@ linter:
}
}
}
+
+@reflectiveTest
+class NewAnalysisOptionsFileNotificationTest
+ extends AnalysisOptionsFileNotificationTest {
+ String get optionsFilePath => '$projectPath/analysis_options.yaml';
+}
+
+@reflectiveTest
+class OldAnalysisOptionsFileNotificationTest
+ extends AnalysisOptionsFileNotificationTest {
+ String get optionsFilePath => '$projectPath/.analysis_options';
+}

Powered by Google App Engine
This is Rietveld 408576698