| 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'), []);
|
| });
|
|
|
|
|