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

Unified Diff: tests/compiler/dart2js/deferred_load_graph_segmentation_test.dart

Issue 223373004: Revert "Load deferred chunks in the right order." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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
« no previous file with comments | « sdk/lib/async/deferred_load.dart ('k') | tests/compiler/dart2js_extra/deferred/deferred_class_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/deferred_load_graph_segmentation_test.dart
diff --git a/tests/compiler/dart2js/deferred_load_graph_segmentation_test.dart b/tests/compiler/dart2js/deferred_load_graph_segmentation_test.dart
index 88a56807aec6b2f7c005e93d48934c2de6e48266..20a663c3b726d637e4a443aa54dda1e3f3c65e12 100644
--- a/tests/compiler/dart2js/deferred_load_graph_segmentation_test.dart
+++ b/tests/compiler/dart2js/deferred_load_graph_segmentation_test.dart
@@ -67,36 +67,24 @@ void main() {
.contains(inputElement));
var hunksToLoad = compiler.deferredLoadTask.hunksToLoad;
-
- mapToNames(id) {
- return hunksToLoad[id].map((l) {
- return new Set.from(l.map((o) => o.name));
- }).toList();
- }
-
- var hunksLib1 = mapToNames("lib1");
- var hunksLib2 = mapToNames("lib2");
- var hunksLib4_1 = mapToNames("lib4_1");
- var hunksLib4_2 = mapToNames("lib4_2");
+ var hunksLib1 = new Set.from(hunksToLoad["lib1"].map((o) => o.name));
+ var hunksLib2 = new Set.from(hunksToLoad["lib2"].map((o) => o.name));
+ var hunksLib4_1 = new Set.from(hunksToLoad["lib4_1"].map((o) => o.name));
+ var hunksLib4_2 = new Set.from(hunksToLoad["lib4_2"].map((o) => o.name));
Expect.equals(hunksLib1.length, 2);
- Expect.equals(hunksLib1[0].length, 1);
- Expect.equals(hunksLib1[1].length, 1);
- Expect.isTrue(hunksLib1[0].contains("lib1_lib2") ||
- hunksLib1[0].contains("lib2_lib1"));
- Expect.isTrue(hunksLib1[1].contains("lib1"));
+ Expect.isTrue(hunksLib1.contains("lib1"));
+ Expect.isTrue(hunksLib1.contains("lib1_lib2") ||
+ hunksLib1.contains("lib2_lib1"));
+ Expect.isTrue(hunksLib2.contains("lib2"));
Expect.equals(hunksLib2.length, 2);
- Expect.equals(hunksLib2[0].length, 1);
- Expect.equals(hunksLib2[1].length, 1);
- Expect.isTrue(hunksLib2[0].contains("lib1_lib2") ||
- hunksLib2[0].contains("lib2_lib1"));
- Expect.isTrue(hunksLib2[1].contains("lib2"));
+ Expect.isTrue(hunksLib2.contains("lib1_lib2") ||
+ hunksLib1.contains("lib2_lib1"));
+ Expect.isTrue(hunksLib4_1.contains("lib4_1"));
Expect.equals(hunksLib4_1.length, 1);
- Expect.equals(hunksLib4_1[0].length, 1);
- Expect.isTrue(hunksLib4_1[0].contains("lib4_1"));
+ Expect.isTrue(hunksLib4_2.contains("lib4_2"));
Expect.equals(hunksLib4_2.length, 1);
- Expect.equals(hunksLib4_2[0].length, 1);
- Expect.isTrue(hunksLib4_2[0].contains("lib4_2"));
Expect.equals(hunksToLoad["main"], null);
+
}));
}
« no previous file with comments | « sdk/lib/async/deferred_load.dart ('k') | tests/compiler/dart2js_extra/deferred/deferred_class_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698