Allow SDK versions to <3.0.0 (#99)
Fix some deprecated usages in tests.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3c9d4dd..f806f93 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 1.14.11
+
+* Set max SDK version to `<3.0.0`.
+
## 1.14.10
* Fix the parameter names in overridden methods to match the source.
diff --git a/analysis_options.yaml b/analysis_options.yaml
index 705910c..d8300ef 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -1,5 +1,4 @@
analyzer:
- strong-mode: true
errors:
unused_element: error
unused_import: error
diff --git a/pubspec.yaml b/pubspec.yaml
index e894bae..c1441de 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,12 +1,13 @@
name: collection
-version: 1.14.11-dev
-author: Dart Team <misc@dartlang.org>
+version: 1.14.11
+
description: Collections and utilities functions and classes related to collections.
+author: Dart Team <misc@dartlang.org>
homepage: https://www.github.com/dart-lang/collection
environment:
# Required for Dart 2.0 collection changes.
- sdk: '>=2.0.0-dev.55.0 <2.0.0'
+ sdk: '>=2.0.0-dev.55.0 <3.0.0'
dev_dependencies:
build_runner: ^0.9.0
diff --git a/test/priority_queue_test.dart b/test/priority_queue_test.dart
index bcb892f..92b6d33 100644
--- a/test/priority_queue_test.dart
+++ b/test/priority_queue_test.dart
@@ -16,8 +16,7 @@
void testDefault() {
test('new PriorityQueue() returns a HeapPriorityQueue', () {
- expect(
- new PriorityQueue<int>(), new isInstanceOf<HeapPriorityQueue<int>>());
+ expect(new PriorityQueue<int>(), new TypeMatcher<HeapPriorityQueue<int>>());
});
testInt(() => new PriorityQueue<int>());
testCustom((comparator) => new PriorityQueue<C>(comparator));
diff --git a/test/queue_list_test.dart b/test/queue_list_test.dart
index 639eb68..543cbae 100644
--- a/test/queue_list_test.dart
+++ b/test/queue_list_test.dart
@@ -259,7 +259,7 @@
stringQueue.addAll(['c', 'd']);
expect(
stringQueue,
- const isInstanceOf<QueueList<String>>(),
+ const TypeMatcher<QueueList<String>>(),
reason: 'Expected QueueList<String>, got ${stringQueue.runtimeType}',
skip: isDart2 ? false : 'Cast does nothing in Dart1',
);
@@ -278,7 +278,7 @@
var numQueue = stringQueue.cast<num>();
expect(
numQueue,
- const isInstanceOf<QueueList<num>>(),
+ const TypeMatcher<QueueList<num>>(),
reason: 'Expected QueueList<num>, got ${numQueue.runtimeType}',
skip: isDart2 ? false : 'Cast does nothing in Dart1',
);
@@ -318,4 +318,4 @@
/// Returns a matcher that expects that a closure throws a
/// [ConcurrentModificationError].
final throwsConcurrentModificationError =
- throwsA(new isInstanceOf<ConcurrentModificationError>());
+ throwsA(new TypeMatcher<ConcurrentModificationError>());
diff --git a/test/utils.dart b/test/utils.dart
index 73926a3..a97275e 100644
--- a/test/utils.dart
+++ b/test/utils.dart
@@ -4,7 +4,7 @@
import "package:test/test.dart";
-final Matcher throwsCastError = throwsA(new isInstanceOf<CastError>());
+final Matcher throwsCastError = throwsA(new TypeMatcher<CastError>());
/// A hack to determine whether we are running in a Dart 2 runtime.
final bool isDart2 = _isTypeArgString('');