| 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 cd490fa87e4e9c495ebae3296d1af5138f28fcee..be2f8c1d04f62820b4a3bbec38e5817113719e00 100644
|
| --- a/pkg/analysis_server/test/integration/analysis/error_test.dart
|
| +++ b/pkg/analysis_server/test/integration/analysis/error_test.dart
|
| @@ -19,6 +19,45 @@ main() {
|
| @reflectiveTest
|
| class AnalysisErrorIntegrationTest
|
| extends AbstractAnalysisServerIntegrationTest {
|
| + test_async_disabled() async {
|
| + String pathname = sourcePath('test.dart');
|
| + writeFile(
|
| + pathname,
|
| + '''
|
| +import 'dart:async';
|
| +class Test {
|
| + Future foo() async {}
|
| +}
|
| + ''');
|
| + await sendAnalysisUpdateOptions(new AnalysisOptions()..enableAsync = false);
|
| + standardAnalysisSetup();
|
| + await analysisFinished;
|
| + expect(currentAnalysisErrors[pathname], isList);
|
| + List<AnalysisError> errors = currentAnalysisErrors[pathname];
|
| + expect(errors, hasLength(1));
|
| + Set<String> allErrorMessages =
|
| + errors.map((AnalysisError e) => e.message).toSet();
|
| + expect(allErrorMessages, contains(
|
| + "Async and sync are not supported in this environment."));
|
| + }
|
| +
|
| + test_async_enabled() async {
|
| + String pathname = sourcePath('test.dart');
|
| + writeFile(
|
| + pathname,
|
| + '''
|
| +import 'dart:async';
|
| +class Test {
|
| + Future foo() async {}
|
| +}
|
| + ''');
|
| + standardAnalysisSetup();
|
| + await analysisFinished;
|
| + expect(currentAnalysisErrors[pathname], isList);
|
| + List<AnalysisError> errors = currentAnalysisErrors[pathname];
|
| + expect(errors, isEmpty);
|
| + }
|
| +
|
| test_detect_simple_error() {
|
| String pathname = sourcePath('test.dart');
|
| writeFile(
|
|
|