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

Unified Diff: pkg/analyzer/test/src/dart/analysis/driver_test.dart

Issue 2809523002: Issue 29288. Resynthesize Import/Export/PartElement for every directive. (Closed)
Patch Set: Created 3 years, 8 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
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 b67a767ab27c2241a340fe609cb6839786588a56..1bff4ea0def4bbe843ae3066eca4bf047826cebb 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
@@ -1231,9 +1231,9 @@ export 'dart:math';
.elementDeclaredByCompilationUnit(result.unit)
.library
.exports;
- expect(
- imports.map((import) => import.exportedLibrary.source.uri.toString()),
- unorderedEquals(['dart:async', 'dart:math']));
+ expect(imports.map((import) {
+ return import.exportedLibrary?.source?.uri?.toString();
+ }), ['dart:async', null, 'dart:math']);
}
test_getResult_invalidUri_imports_dart() async {
@@ -1251,12 +1251,11 @@ import 'dart:math';
.elementDeclaredByCompilationUnit(result.unit)
.library
.imports;
- expect(
- imports.map((import) => import.importedLibrary.source.uri.toString()),
- unorderedEquals(['dart:async', 'dart:math', 'dart:core']));
+ expect(imports.map((import) {
+ return import.importedLibrary?.source?.uri?.toString();
+ }), ['dart:async', null, 'dart:math', 'dart:core']);
}
- @failingTest
test_getResult_invalidUri_metadata() async {
String content = r'''
@foo

Powered by Google App Engine
This is Rietveld 408576698