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

Unified Diff: pkg/serialization/test/serialization_test.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « pkg/serialization/lib/src/serialization_rule.dart ('k') | pkg/unittest/lib/html_enhanced_config.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/serialization/test/serialization_test.dart
diff --git a/pkg/serialization/test/serialization_test.dart b/pkg/serialization/test/serialization_test.dart
index 3a165944372417e34eecd3f7bc63bed8b71223b1..dcd8a56dea7928f3863bcc369f1afedd3c9cc371 100644
--- a/pkg/serialization/test/serialization_test.dart
+++ b/pkg/serialization/test/serialization_test.dart
@@ -192,7 +192,7 @@ main() {
var trace = new Trace(new Writer(s));
trace.writer.trace = trace;
trace.trace(n1);
- var all = trace.writer.references.keys;
+ var all = trace.writer.references.keys.toSet();
expect(all.length, 4);
expect(all.contains(n1), isTrue);
expect(all.contains(n2), isTrue);
@@ -207,7 +207,7 @@ main() {
w.write(n1);
expect(w.states.length, 4); // prims, lists, essential lists, basic
var children = 0, name = 1, parent = 2;
- List rootNode = w.states[3].filter((x) => x[name] == "1");
+ List rootNode = w.states[3].where((x) => x[name] == "1").toList();
rootNode = rootNode.first;
expect(rootNode[parent], isNull);
var list = w.states[1].first;
@@ -490,7 +490,7 @@ runRoundTripTestFlat(serializerSetUp) {
/** Extract the state from [object] using the rules in [s] and return it. */
states(object, Serialization s) {
var rules = s.rulesFor(object, null);
- return rules.map((x) => x.extractState(object, doNothing));
+ return rules.mappedBy((x) => x.extractState(object, doNothing)).toList();
}
/** A hard-coded rule for serializing Node instances. */
@@ -502,4 +502,4 @@ class NodeRule extends CustomRule {
node.parent = state[0];
node.children = state[2];
}
-}
+}
« no previous file with comments | « pkg/serialization/lib/src/serialization_rule.dart ('k') | pkg/unittest/lib/html_enhanced_config.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698