Update to test package, make test work on dart2js.

The equality test was missing the status file that marked it as failing on
dart2js. Rewrote it to not compare doubles to integers and expect them to not
be identical.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1213723007.
diff --git a/.gitignore b/.gitignore
index 89f7747..25a1df3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,4 +5,5 @@
 .settings/
 build/
 packages
+.packages
 pubspec.lock
diff --git a/pubspec.yaml b/pubspec.yaml
index 47f8b1b..33110ba 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,9 +1,9 @@
 name: collection
-version: 1.1.1
+version: 1.1.2-dev
 author: Dart Team <misc@dartlang.org>
 description: Collections and utilities functions and classes related to collections.
 homepage: https://www.github.com/dart-lang/collection
 environment:
   sdk: '>=1.5.0 <2.0.0'
 dev_dependencies:
-  unittest: '>=0.9.0 <0.11.0'
+  test: '^0.12.0'
diff --git a/test/algorithms_test.dart b/test/algorithms_test.dart
index 933e268..61fbf5b 100644
--- a/test/algorithms_test.dart
+++ b/test/algorithms_test.dart
@@ -5,7 +5,7 @@
 /// Tests algorithm utilities.
 
 import "package:collection/collection.dart";
-import "package:unittest/unittest.dart";
+import "package:test/test.dart";
 import 'dart:math';
 
 void main() {
diff --git a/test/canonicalized_map_test.dart b/test/canonicalized_map_test.dart
index 1793777..f5f009b 100644
--- a/test/canonicalized_map_test.dart
+++ b/test/canonicalized_map_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import "package:collection/collection.dart";
-import "package:unittest/unittest.dart";
+import "package:test/test.dart";
 
 void main() {
   group("with an empty canonicalized map", () {
diff --git a/test/equality_test.dart b/test/equality_test.dart
index edabfd5..e609608 100644
--- a/test/equality_test.dart
+++ b/test/equality_test.dart
@@ -6,113 +6,112 @@
 
 import "dart:collection";
 import "package:collection/collection.dart";
-import "package:unittest/unittest.dart";
+import "package:test/test.dart";
 
 main() {
+  o(id) => new Element(id);
+
+  // Lists that are point-wise equal, but not identical.
+  var list1 = [o(1), o(2), o(3), o(4), o(5)];
+  var list2 = [o(1), o(2), o(3), o(4), o(5)];
+  // Similar length list with equal elements in different order.
+  var list3 = [o(1), o(3), o(5), o(4), o(2)];
+
   test("IterableEquality - List", () {
-    var l1 = [1, 2, 3, 4, 5];
-    var l2 = [1.0, 2.0, 3.0, 4.0, 5.0];
-    expect(const IterableEquality().equals(l1, l2), isTrue);
+    expect(const IterableEquality().equals(list1, list2), isTrue);
     Equality iterId = const IterableEquality(const IdentityEquality());
-    expect(iterId.equals(l1, l2), isFalse);  /// 01: ok
+    expect(iterId.equals(list1, list2), isFalse);
   });
 
   test("IterableEquality - LinkedSet", () {
-    var l1 = new LinkedHashSet.from([1, 2, 3, 4, 5]);
-    var l2 = new LinkedHashSet.from([1.0, 2.0, 3.0, 4.0, 5.0]);
+    var l1 = new LinkedHashSet.from(list1);
+    var l2 = new LinkedHashSet.from(list2);
     expect(const IterableEquality().equals(l1, l2), isTrue);
     Equality iterId = const IterableEquality(const IdentityEquality());
-    expect(iterId.equals(l1, l2), isFalse);  /// 02: ok
+    expect(iterId.equals(l1, l2), isFalse);
   });
 
   test("ListEquality", () {
-    var l1 = [1, 2, 3, 4, 5];
-    var l2 = [1.0, 2.0, 3.0, 4.0, 5.0];
-    expect(const ListEquality().equals(l1, l2),
+    expect(const ListEquality().equals(list1, list2),
            isTrue);
     Equality listId = const ListEquality(const IdentityEquality());
-    expect(listId.equals(l1, l2), isFalse);  /// 03: ok
+    expect(listId.equals(list1, list2), isFalse);
   });
 
   test("ListInequality length", () {
-    var l1 = [1, 2, 3, 4, 5];
-    var l2 = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0];
-    expect(const ListEquality().equals(l1, l2),
+    var list4 = [o(1), o(2), o(3), o(4), o(5), o(6)];
+    expect(const ListEquality().equals(list1, list4),
            isFalse);
-    expect(const ListEquality(const IdentityEquality()).equals(l1, l2),
+    expect(const ListEquality(const IdentityEquality()).equals(list1, list4),
            isFalse);
   });
 
   test("ListInequality value", () {
-    var l1 = [1, 2, 3, 4, 5];
-    var l2 = [1.0, 2.0, 3.0, 4.0, 6.0];
-    expect(const ListEquality().equals(l1, l2),
+    var list5 = [o(1), o(2), o(3), o(4), o(6)];
+    expect(const ListEquality().equals(list1, list5),
            isFalse);
-    expect(const ListEquality(const IdentityEquality()).equals(l1, l2),
+    expect(const ListEquality(const IdentityEquality()).equals(list1, list5),
            isFalse);
   });
 
   test("UnorderedIterableEquality", () {
-    var l1 = [1, 2, 3, 4, 5];
-    var l2 = [1.0, 3.0, 5.0, 4.0, 2.0];
-    expect(const UnorderedIterableEquality().equals(l1, l2),
+    expect(const UnorderedIterableEquality().equals(list1, list3),
            isTrue);
     Equality uniterId =
         const UnorderedIterableEquality(const IdentityEquality());
-    expect(uniterId.equals(l1, l2), isFalse);  /// 04: ok
+    expect(uniterId.equals(list1, list3), isFalse);
   });
 
   test("UnorderedIterableInequality length", () {
-    var l1 = [1, 2, 3, 4, 5];
-    var l2 = [1.0, 3.0, 5.0, 4.0, 2.0, 1.0];
-    expect(const UnorderedIterableEquality().equals(l1, l2),
+    var list6 = [o(1), o(3), o(5), o(4), o(2), o(1)];
+    expect(const UnorderedIterableEquality().equals(list1, list6),
            isFalse);
     expect(const UnorderedIterableEquality(const IdentityEquality())
-               .equals(l1, l2),
+               .equals(list1, list6),
            isFalse);
   });
 
   test("UnorderedIterableInequality values", () {
-    var l1 = [1, 2, 3, 4, 5];
-    var l2 = [1.0, 3.0, 5.0, 4.0, 6.0];
-    expect(const UnorderedIterableEquality().equals(l1, l2),
+    var list7 = [o(1), o(3), o(5), o(4), o(6)];
+    expect(const UnorderedIterableEquality().equals(list1, list7),
            isFalse);
     expect(const UnorderedIterableEquality(const IdentityEquality())
-               .equals(l1, l2),
+               .equals(list1, list7),
            isFalse);
   });
 
   test("SetEquality", () {
-    var l1 = new HashSet.from([1, 2, 3, 4, 5]);
-    var l2 = new LinkedHashSet.from([1.0, 3.0, 5.0, 4.0, 2.0]);
-    expect(const SetEquality().equals(l1, l2),
-           isTrue);
+    var set1 = new HashSet.from(list1);
+    var set2 = new LinkedHashSet.from(list3);
+    expect(const SetEquality().equals(set1, set2), isTrue);
     Equality setId = const SetEquality(const IdentityEquality());
-    expect(setId.equals(l1, l2), isFalse);  /// 05: ok
+    expect(setId.equals(set1, set2), isFalse);
   });
 
   test("SetInequality length", () {
-    var l1 = new HashSet.from([1, 2, 3, 4, 5]);
-    var l2 = new LinkedHashSet.from([1.0, 3.0, 5.0, 4.0, 2.0, 6.0]);
-    expect(const SetEquality().equals(l1, l2),
+    var list8 = [o(1), o(3), o(5), o(4), o(2), o(6)];
+    var set1 = new HashSet.from(list1);
+    var set2 = new LinkedHashSet.from(list8);
+    expect(const SetEquality().equals(set1, set2),
            isFalse);
-    expect(const SetEquality(const IdentityEquality()).equals(l1, l2),
+    expect(const SetEquality(const IdentityEquality()).equals(set1, set2),
            isFalse);
   });
 
   test("SetInequality value", () {
-    var l1 = new HashSet.from([1, 2, 3, 4, 5]);
-    var l2 = new LinkedHashSet.from([1.0, 3.0, 5.0, 4.0, 6.0]);
-    expect(const SetEquality().equals(l1, l2),
+    var list7 = [o(1), o(3), o(5), o(4), o(6)];
+    var set1 = new HashSet.from(list1);
+    var set2 = new LinkedHashSet.from(list7);
+    expect(const SetEquality().equals(set1, set2),
            isFalse);
-    expect(const SetEquality(const IdentityEquality()).equals(l1, l2),
+    expect(const SetEquality(const IdentityEquality()).equals(set1, set2),
            isFalse);
   });
 
-  var map1a = {"x": [1, 2, 3], "y": [true, false, null]};
-  var map1b = {"x": [4.0, 5.0, 6.0], "y": [false, true, null]};
-  var map2a = {"x": [3.0, 2.0, 1.0], "y": [false, true, null]};
-  var map2b = {"x": [6, 5, 4], "y": [null, false, true]};
+  var map1a = {"x": [o(1), o(2), o(3)], "y": [true, false, null]};
+  var map1b = {"x": [o(4), o(5), o(6)], "y": [false, true, null]};
+  var map2a = {"x": [o(3), o(2), o(1)], "y": [false, true, null]};
+  var map2b = {"x": [o(6), o(5), o(4)], "y": [null, false, true]};
   var l1 = [map1a, map1b];
   var l2 = [map2a, map2b];
   var s1 = new Set.from(l1);
@@ -162,3 +161,15 @@
         isTrue);
   });
 }
+
+/// Wrapper objects for an `id` value.
+///
+/// Compares the `id` value by equality and for comparison.
+/// Allows creating simple objects that are equal without being identical.
+class Element implements Comparable<Element> {
+  final Comparable id;
+  const Element(this.id);
+  int get hashCode => id.hashCode;
+  bool operator==(Object other) => other is Element && id == other.id;
+  int compareTo(other) => id.compareTo(other.id);
+}
diff --git a/test/iterable_zip_test.dart b/test/iterable_zip_test.dart
index ec191fe..cc8ac76 100644
--- a/test/iterable_zip_test.dart
+++ b/test/iterable_zip_test.dart
@@ -4,7 +4,7 @@
 
 import "dart:collection";
 import "package:collection/iterable_zip.dart";
-import "package:unittest/unittest.dart";
+import "package:test/test.dart";
 
 /// Iterable like [base] except that it throws when value equals [errorValue].
 Iterable iterError(Iterable base, int errorValue) {
diff --git a/test/priority_queue_test.dart b/test/priority_queue_test.dart
index 703ab72..264bf94 100644
--- a/test/priority_queue_test.dart
+++ b/test/priority_queue_test.dart
@@ -5,7 +5,7 @@
 /// Tests priority queue implementations utilities.
 
 import "package:collection/priority_queue.dart";
-import "package:unittest/unittest.dart";
+import "package:test/test.dart";
 
 void main() {
   testInt(() => new HeapPriorityQueue<int>());
diff --git a/test/queue_list_test.dart b/test/queue_list_test.dart
index 6b213c8..cbe518f 100644
--- a/test/queue_list_test.dart
+++ b/test/queue_list_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import "package:collection/collection.dart";
-import "package:unittest/unittest.dart";
+import "package:test/test.dart";
 
 void main() {
   group("new QueueList()", () {
@@ -272,5 +272,4 @@
 /// Returns a matcher that expects that a closure throws a
 /// [ConcurrentModificationError].
 final throwsConcurrentModificationError = throwsA(
-    new isInstanceOf<ConcurrentModificationError>(
-        "ConcurrentModificationError"));
+    new isInstanceOf<ConcurrentModificationError>());
diff --git a/test/unmodifiable_collection_test.dart b/test/unmodifiable_collection_test.dart
index d810b75..82189ab 100644
--- a/test/unmodifiable_collection_test.dart
+++ b/test/unmodifiable_collection_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import "package:collection/wrappers.dart";
-import "package:unittest/unittest.dart";
+import "package:test/test.dart";
 
 // Test unmodifiable collection views.
 // The collections should pass through the operations that are allowed,
diff --git a/test/wrapper_test.dart b/test/wrapper_test.dart
index 5858aaf..a3526a3 100644
--- a/test/wrapper_test.dart
+++ b/test/wrapper_test.dart
@@ -6,7 +6,7 @@
 
 import "dart:collection";
 import "package:collection/collection.dart";
-import "package:unittest/unittest.dart";
+import "package:test/test.dart";
 
 // Test that any member access/call on the wrapper object is equal to
 // an expected access on the wrapped object.