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

Unified Diff: pkg/analysis_server/test/integration/analysis/error_test.dart

Issue 2674863004: Add a test that server does not send errors when errors have been disabled (Closed)
Patch Set: Added driver version Created 3 years, 10 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
« no previous file with comments | « no previous file | pkg/analysis_server/test/integration/integration_tests.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/integration/analysis/error_test.dart
diff --git a/pkg/analysis_server/test/integration/analysis/error_test.dart b/pkg/analysis_server/test/integration/analysis/error_test.dart
index 5c4bea4be28d41d396134fcfc0e02cadec086c1a..3d11f4e571e8a549082a8f7795b4e6538d64c871 100644
--- a/pkg/analysis_server/test/integration/analysis/error_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/error_test.dart
@@ -2,6 +2,8 @@
// 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.
+import 'dart:async';
+
import 'package:analysis_server/plugin/protocol/protocol.dart';
import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -11,6 +13,8 @@ import '../integration_tests.dart';
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisErrorIntegrationTest);
+ defineReflectiveTests(NoAnalysisErrorsIntegrationTest);
+ defineReflectiveTests(NoAnalysisErrorsIntegrationTest_Driver);
});
}
@@ -97,3 +101,44 @@ abstract class C extends B {
@reflectiveTest
class AnalysisErrorIntegrationTest
extends AbstractAnalysisErrorIntegrationTest {}
+
+@reflectiveTest
+class NoAnalysisErrorsIntegrationTest
+ extends AbstractAnalysisServerIntegrationTest {
+ @override
+ Future startServer(
+ {bool checked: true, int diagnosticPort, int servicesPort}) =>
+ server.start(
+ checked: checked,
+ diagnosticPort: diagnosticPort,
+ enableNewAnalysisDriver: enableNewAnalysisDriver,
+ noErrorNotification: true,
+ servicesPort: servicesPort);
+
+ test_detect_simple_error() {
+ String pathname = sourcePath('test.dart');
+ writeFile(
+ pathname,
+ '''
+main() {
+ print(null) // parse error: missing ';'
+}''');
+ standardAnalysisSetup();
+ return analysisFinished.then((_) {
+ expect(currentAnalysisErrors[pathname], isNull);
+ });
+ }
+}
+
+@reflectiveTest
+class NoAnalysisErrorsIntegrationTest_Driver
+ extends NoAnalysisErrorsIntegrationTest {
+ @override
+ bool get enableNewAnalysisDriver => true;
+
+ @failingTest
+ @override
+ test_detect_simple_error() {
+ return super.test_detect_simple_error();
+ }
+}
« no previous file with comments | « no previous file | pkg/analysis_server/test/integration/integration_tests.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698