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

Unified Diff: tests/html/xmldocument_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 | « tests/html/xhr_test.dart ('k') | tests/html/xmlelement_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/xmldocument_test.dart
diff --git a/tests/html/xmldocument_test.dart b/tests/html/xmldocument_test.dart
index 35666e6a89ab3ae025b4738fadd1f3c0c4e3565a..9dc830bc1ac56bf1bec46521372045f7743ff4bd 100644
--- a/tests/html/xmldocument_test.dart
+++ b/tests/html/xmldocument_test.dart
@@ -41,7 +41,8 @@ main() {
group('children', () {
test('filters out non-element nodes', () {
final doc = new XMLDocument.xml("<xml>1<a/><b/>2<c/>3<d/></xml>");
- expect(doc.children.map((e) => e.tagName), ["a", "b", "c", "d"]);
+ expect(doc.children.mappedBy((e) => e.tagName).toList(),
+ ["a", "b", "c", "d"]);
});
test('overwrites nodes when set', () {
@@ -101,13 +102,13 @@ main() {
expect(classes, unorderedEquals(['foo', 'bar', 'baz']));
});
- test('map', () {
- expect(makeClassSet().map((c) => c.toUpperCase()),
+ test('mappedBy', () {
+ expect(makeClassSet().mappedBy((c) => c.toUpperCase()).toList(),
unorderedEquals(['FOO', 'BAR', 'BAZ']));
});
- test('filter', () {
- expect(makeClassSet().filter((c) => c.contains('a')),
+ test('where', () {
+ expect(makeClassSet().where((c) => c.contains('a')).toSet(),
unorderedEquals(['bar', 'baz']));
});
@@ -116,9 +117,9 @@ main() {
expect(makeClassSet().every((c) => c.contains('a')), isFalse);
});
- test('some', () {
- expect(makeClassSet().some((c) => c.contains('a')), isTrue);
- expect(makeClassSet().some((c) => c is num), isFalse);
+ test('any', () {
+ expect(makeClassSet().any((c) => c.contains('a')), isTrue);
+ expect(makeClassSet().any((c) => c is num), isFalse);
});
test('isEmpty', () {
@@ -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').map((e) => e.id), ['f1', 'f2']);
+ expect(doc.queryAll('foo').mappedBy((e) => e.id).toList(), ['f1', 'f2']);
expect(doc.queryAll('baz'), []);
});
« no previous file with comments | « tests/html/xhr_test.dart ('k') | tests/html/xmlelement_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698