| Index: pkg/analyzer/test/src/task/dart_test.dart
|
| diff --git a/pkg/analyzer/test/src/task/dart_test.dart b/pkg/analyzer/test/src/task/dart_test.dart
|
| index b81e72a709de5af3df5a99bc5c20e1ca15ce61c3..23930d8f14ac924597b5627ddaac4961025edd28 100644
|
| --- a/pkg/analyzer/test/src/task/dart_test.dart
|
| +++ b/pkg/analyzer/test/src/task/dart_test.dart
|
| @@ -2993,6 +2993,41 @@ class B {}''');
|
| expect(outputs[UNITS], hasLength(1));
|
| }
|
|
|
| + test_perform_enableAsync_false() {
|
| + AnalysisOptionsImpl options = new AnalysisOptionsImpl();
|
| + options.enableAsync = false;
|
| + prepareAnalysisContext(options);
|
| + _performParseTask(r'''
|
| +import 'dart:async';
|
| +class B {void foo() async {}}''');
|
| + expect(outputs, hasLength(9));
|
| + expect(outputs[EXPLICITLY_IMPORTED_LIBRARIES], hasLength(1));
|
| + expect(outputs[EXPORTED_LIBRARIES], hasLength(0));
|
| + _assertHasCore(outputs[IMPORTED_LIBRARIES], 2);
|
| + expect(outputs[INCLUDED_PARTS], hasLength(0));
|
| + expect(outputs[LIBRARY_SPECIFIC_UNITS], hasLength(1));
|
| + expect(outputs[PARSE_ERRORS], hasLength(1));
|
| + expect(outputs[PARSED_UNIT], isNotNull);
|
| + expect(outputs[SOURCE_KIND], SourceKind.LIBRARY);
|
| + expect(outputs[UNITS], hasLength(1));
|
| + }
|
| +
|
| + test_perform_enableAsync_true() {
|
| + _performParseTask(r'''
|
| +import 'dart:async';
|
| +class B {void foo() async {}}''');
|
| + expect(outputs, hasLength(9));
|
| + expect(outputs[EXPLICITLY_IMPORTED_LIBRARIES], hasLength(1));
|
| + expect(outputs[EXPORTED_LIBRARIES], hasLength(0));
|
| + _assertHasCore(outputs[IMPORTED_LIBRARIES], 2);
|
| + expect(outputs[INCLUDED_PARTS], hasLength(0));
|
| + expect(outputs[LIBRARY_SPECIFIC_UNITS], hasLength(1));
|
| + expect(outputs[PARSE_ERRORS], hasLength(0));
|
| + expect(outputs[PARSED_UNIT], isNotNull);
|
| + expect(outputs[SOURCE_KIND], SourceKind.LIBRARY);
|
| + expect(outputs[UNITS], hasLength(1));
|
| + }
|
| +
|
| test_perform_computeSourceKind_noDirectives_hasContainingLibrary() {
|
| // Parse "lib.dart" to let the context know that "test.dart" is included.
|
| computeResult(
|
|
|