Index: pkg/analyzer/test/src/dart/analysis/driver_test.dart |
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_test.dart |
index 79e551fb2d420bb234117154b3c4e7f60f5d5fbd..53c4702f348ec0136b88e3e2509665a7c8433c9e 100644 |
--- a/pkg/analyzer/test/src/dart/analysis/driver_test.dart |
+++ b/pkg/analyzer/test/src/dart/analysis/driver_test.dart |
@@ -414,9 +414,14 @@ part of lib; |
AnalysisResult libResult = await driver.getResult(lib); |
List<AnalysisError> errors = libResult.errors; |
- expect(errors, hasLength(1)); |
- expect(errors[0].errorCode, |
- ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART); |
+ if (libResult.unit.element.context.analysisOptions.enableUriInPartOf) { |
+ // TODO(28522): Should cause an error for wrong library name. |
+ expect(errors, hasLength(0)); |
+ } else { |
+ expect(errors, hasLength(1)); |
+ expect(errors[0].errorCode, |
+ ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART); |
+ } |
} |
test_analyze_resolveDirectives_error_partOfDifferentLibrary_byName() async { |