| 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 0e236efe4cd3f75de13cf4bf196683828bc07b58..9b3a0b7f7d7f63de8a450e12b850bd7aa931c458 100644
|
| --- a/pkg/analyzer/test/src/task/dart_test.dart
|
| +++ b/pkg/analyzer/test/src/task/dart_test.dart
|
| @@ -2137,6 +2137,22 @@ class B {}''');
|
| expect(outputs[UNITS], hasLength(1));
|
| }
|
|
|
| + test_perform_computeSourceKind_noDirectives_noContainingLibraries() {
|
| + _performParseTask('');
|
| + expect(outputs[SOURCE_KIND], SourceKind.LIBRARY);
|
| + }
|
| +
|
| + test_perform_computeSourceKind_noDirectives_hasContainingLibraries() {
|
| + // Parse "lib.dart" to let the context know that "test.dart" is a part.
|
| + _computeResult(newSource('/lib.dart', r'''
|
| +library lib;
|
| +part 'test.dart';
|
| +'''), PARSED_UNIT);
|
| + // So, know "test.dat" is parsed as a part.
|
| + _performParseTask('');
|
| + expect(outputs[SOURCE_KIND], SourceKind.PART);
|
| + }
|
| +
|
| test_perform_doesNotExist() {
|
| _performParseTask(null);
|
| expect(outputs, hasLength(8));
|
|
|