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

Unified Diff: pkg/front_end/test/src/incremental/file_state_test.dart

Issue 2934933002: Build reverse dependencies between LibraryCycle(s). (Closed)
Patch Set: Created 3 years, 6 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/front_end/test/src/incremental/file_state_test.dart
diff --git a/pkg/front_end/test/src/incremental/file_state_test.dart b/pkg/front_end/test/src/incremental/file_state_test.dart
index 7232e95bc0ebf78491ab51c13cb13bbe98c37485..e3e3dc87c108cfed14a395d23df27d20ee8f5ad3 100644
--- a/pkg/front_end/test/src/incremental/file_state_test.dart
+++ b/pkg/front_end/test/src/incremental/file_state_test.dart
@@ -436,12 +436,19 @@ import 'b.dart';
FileState c = await fsState.getFile(cUri);
FileState d = await fsState.getFile(dUri);
- List<LibraryCycle> order = d.topologicalOrder;
- expect(order, hasLength(4));
- expect(order[0].libraries, contains(core));
- expect(order[1].libraries, unorderedEquals([a]));
- expect(order[2].libraries, unorderedEquals([b, c]));
- expect(order[3].libraries, unorderedEquals([d]));
+ List<LibraryCycle> cycles = d.topologicalOrder;
+ expect(cycles, hasLength(4));
+
+ expect(cycles[0].libraries, contains(core));
+ expect(cycles[1].libraries, unorderedEquals([a]));
+ expect(cycles[2].libraries, unorderedEquals([b, c]));
+ expect(cycles[3].libraries, unorderedEquals([d]));
+
+ expect(cycles[0].directUsers,
+ unorderedEquals([cycles[1], cycles[2], cycles[3]]));
+ expect(cycles[1].directUsers, unorderedEquals([cycles[3]]));
+ expect(cycles[2].directUsers, unorderedEquals([cycles[3]]));
+ expect(cycles[3].directUsers, isEmpty);
}
test_topologicalOrder_cycleBeforeTarget_export() async {

Powered by Google App Engine
This is Rietveld 408576698