Index: tests/html/htmlcollection_test.dart |
diff --git a/tests/html/htmlcollection_test.dart b/tests/html/htmlcollection_test.dart |
index 9781c3c93c230c1e4a08c862656c492e072fea7c..949d60accb8238bf14a42af763d28daa9180e3b7 100644 |
--- a/tests/html/htmlcollection_test.dart |
+++ b/tests/html/htmlcollection_test.dart |
@@ -1,4 +1,5 @@ |
library ElementListTest; |
+ |
import 'package:unittest/unittest.dart'; |
import 'package:unittest/html_config.dart'; |
import 'dart:html'; |
@@ -37,8 +38,7 @@ main() { |
test('IsList', () { |
Element root = insertTestDiv(); |
- List<Element> eachChecked = |
- document.query('#allChecked').children; |
+ List<Element> eachChecked = document.query('#allChecked').children; |
expect(eachChecked, isList); |
@@ -47,14 +47,11 @@ main() { |
test('Every', () { |
Element root = insertTestDiv(); |
- List<Element> eachChecked = |
- document.query('#allChecked').children; |
+ List<Element> eachChecked = document.query('#allChecked').children; |
- List<Element> someChecked = |
- document.query('#someChecked').children; |
+ List<Element> someChecked = document.query('#someChecked').children; |
- List<Element> noneChecked = |
- document.query('#noneChecked').children; |
+ List<Element> noneChecked = document.query('#noneChecked').children; |
expect(eachChecked.length, 4); |
expect(someChecked.length, 4); |
@@ -72,14 +69,11 @@ main() { |
test('Some', () { |
Element root = insertTestDiv(); |
- List<Element> eachChecked = |
- document.query('#allChecked').children; |
+ List<Element> eachChecked = document.query('#allChecked').children; |
- List<Element> someChecked = |
- document.query('#someChecked').children; |
+ List<Element> someChecked = document.query('#someChecked').children; |
- List<Element> noneChecked = |
- document.query('#noneChecked').children; |
+ List<Element> noneChecked = document.query('#noneChecked').children; |
expect(eachChecked.length, 4); |
expect(someChecked.length, 4); |
@@ -97,14 +91,11 @@ main() { |
test('Filter', () { |
Element root = insertTestDiv(); |
- List<Element> eachChecked = |
- document.query('#allChecked').children; |
+ List<Element> eachChecked = document.query('#allChecked').children; |
- List<Element> someChecked = |
- document.query('#someChecked').children; |
+ List<Element> someChecked = document.query('#someChecked').children; |
- List<Element> noneChecked = |
- document.query('#noneChecked').children; |
+ List<Element> noneChecked = document.query('#noneChecked').children; |
expect(eachChecked.length, 4); |
expect(someChecked.length, 4); |
@@ -122,11 +113,9 @@ main() { |
test('IsEmpty', () { |
Element root = insertTestDiv(); |
- List<Element> someChecked = |
- document.query('#someChecked').children; |
+ List<Element> someChecked = document.query('#someChecked').children; |
- List<Element> emptyDiv = |
- document.query('#emptyDiv').children; |
+ List<Element> emptyDiv = document.query('#emptyDiv').children; |
expect(someChecked.length, 4); |
expect(emptyDiv.length, 0); |
@@ -140,22 +129,19 @@ main() { |
int countWithForEach(collection, predicate) { |
int count = 0; |
collection.forEach((element) { |
- if (predicate(element)) count++; |
- }); |
+ if (predicate(element)) count++; |
+ }); |
return count; |
} |
test('ForEach', () { |
Element root = insertTestDiv(); |
- List<Element> eachChecked = |
- document.query('#allChecked').children; |
+ List<Element> eachChecked = document.query('#allChecked').children; |
- List<Element> someChecked = |
- document.query('#someChecked').children; |
+ List<Element> someChecked = document.query('#someChecked').children; |
- List<Element> noneChecked = |
- document.query('#noneChecked').children; |
+ List<Element> noneChecked = document.query('#noneChecked').children; |
expect(eachChecked.length, 4); |
expect(someChecked.length, 4); |
@@ -179,17 +165,15 @@ main() { |
return count; |
} |
- test('ForLoop', () { // Uses iterator. |
+ test('ForLoop', () { |
+ // Uses iterator. |
Element root = insertTestDiv(); |
- List<Element> eachChecked = |
- document.query('#allChecked').children; |
+ List<Element> eachChecked = document.query('#allChecked').children; |
- List<Element> someChecked = |
- document.query('#someChecked').children; |
+ List<Element> someChecked = document.query('#someChecked').children; |
- List<Element> noneChecked = |
- document.query('#noneChecked').children; |
+ List<Element> noneChecked = document.query('#noneChecked').children; |
expect(eachChecked.length, 4); |
expect(someChecked.length, 4); |
@@ -207,8 +191,7 @@ main() { |
test('Last', () { |
Element root = insertTestDiv(); |
- List<Element> someChecked = |
- document.query('#someChecked').children; |
+ List<Element> someChecked = document.query('#someChecked').children; |
expect(someChecked.length, 4); |
@@ -219,11 +202,9 @@ main() { |
test('IndexOf', () { |
Element root = insertTestDiv(); |
- List<Element> someChecked = |
- document.query('#someChecked').children; |
+ List<Element> someChecked = document.query('#someChecked').children; |
- List<Element> noneChecked = |
- document.query('#noneChecked').children; |
+ List<Element> noneChecked = document.query('#noneChecked').children; |
expect(someChecked.length, 4); |
expect(noneChecked.length, 4); |
@@ -248,11 +229,9 @@ main() { |
test('LastIndexOf', () { |
Element root = insertTestDiv(); |
- List<Element> someChecked = |
- document.query('#someChecked').children; |
+ List<Element> someChecked = document.query('#someChecked').children; |
- List<Element> noneChecked = |
- document.query('#noneChecked').children; |
+ List<Element> noneChecked = document.query('#noneChecked').children; |
expect(someChecked.length, 4); |
expect(noneChecked.length, 4); |