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

Unified Diff: tests/html/xmldocument_test.dart

Issue 11414069: Make mappedBy lazy. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Reupload due to error. Created 8 years, 1 month 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: tests/html/xmldocument_test.dart
diff --git a/tests/html/xmldocument_test.dart b/tests/html/xmldocument_test.dart
index c5e672fa6bf9e20cb2fea7488d09af268bc92304..d9afa92a665e062eb0e7af5e8b7f676eba25c108 100644
--- a/tests/html/xmldocument_test.dart
+++ b/tests/html/xmldocument_test.dart
@@ -41,7 +41,8 @@ main() {
group('elements', () {
test('filters out non-element nodes', () {
final doc = new XMLDocument.xml("<xml>1<a/><b/>2<c/>3<d/></xml>");
- expect(doc.elements.mappedBy((e) => e.tagName), ["a", "b", "c", "d"]);
+ expect(doc.elements.mappedBy((e) => e.tagName).toList(),
+ ["a", "b", "c", "d"]);
});
test('overwrites nodes when set', () {
@@ -102,7 +103,7 @@ main() {
});
test('map', () {
- expect(makeClassSet().mappedBy((c) => c.toUpperCase()),
+ expect(makeClassSet().mappedBy((c) => c.toUpperCase()).toList(),
unorderedEquals(['FOO', 'BAR', 'BAZ']));
});
@@ -427,7 +428,7 @@ main() {
test('queryAll', () {
final doc = new XMLDocument.xml(
"<xml><foo id='f1' /><bar><foo id='f2' /></bar></xml>");
- expect(doc.queryAll('foo').mappedBy((e) => e.id), ['f1', 'f2']);
+ expect(doc.queryAll('foo').mappedBy((e) => e.id).toList(), ['f1', 'f2']);
expect(doc.queryAll('baz'), []);
});

Powered by Google App Engine
This is Rietveld 408576698