Skip to content

Commit 7e9f730

Browse files
chalinnatebosch
authored andcommitted
Allow SDK versions to <3.0.0 (flutter#99)
Fix some deprecated usages in tests.
1 parent 6b66e9b commit 7e9f730

6 files changed

+13
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.14.11
2+
3+
* Set max SDK version to `<3.0.0`.
4+
15
## 1.14.10
26

37
* Fix the parameter names in overridden methods to match the source.

analysis_options.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
analyzer:
2-
strong-mode: true
32
errors:
43
unused_element: error
54
unused_import: error

pubspec.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
name: collection
2-
version: 1.14.11-dev
3-
author: Dart Team <[email protected]>
2+
version: 1.14.11
3+
44
description: Collections and utilities functions and classes related to collections.
5+
author: Dart Team <[email protected]>
56
homepage: https://www.github.com/dart-lang/collection
67

78
environment:
89
# Required for Dart 2.0 collection changes.
9-
sdk: '>=2.0.0-dev.55.0 <2.0.0'
10+
sdk: '>=2.0.0-dev.55.0 <3.0.0'
1011

1112
dev_dependencies:
1213
build_runner: ^0.9.0

test/priority_queue_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ void main() {
1616

1717
void testDefault() {
1818
test('new PriorityQueue() returns a HeapPriorityQueue', () {
19-
expect(
20-
new PriorityQueue<int>(), new isInstanceOf<HeapPriorityQueue<int>>());
19+
expect(new PriorityQueue<int>(), new TypeMatcher<HeapPriorityQueue<int>>());
2120
});
2221
testInt(() => new PriorityQueue<int>());
2322
testCustom((comparator) => new PriorityQueue<C>(comparator));

test/queue_list_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ void main() {
259259
stringQueue.addAll(['c', 'd']);
260260
expect(
261261
stringQueue,
262-
const isInstanceOf<QueueList<String>>(),
262+
const TypeMatcher<QueueList<String>>(),
263263
reason: 'Expected QueueList<String>, got ${stringQueue.runtimeType}',
264264
skip: isDart2 ? false : 'Cast does nothing in Dart1',
265265
);
@@ -278,7 +278,7 @@ void main() {
278278
var numQueue = stringQueue.cast<num>();
279279
expect(
280280
numQueue,
281-
const isInstanceOf<QueueList<num>>(),
281+
const TypeMatcher<QueueList<num>>(),
282282
reason: 'Expected QueueList<num>, got ${numQueue.runtimeType}',
283283
skip: isDart2 ? false : 'Cast does nothing in Dart1',
284284
);
@@ -318,4 +318,4 @@ QueueList withInternalGap() {
318318
/// Returns a matcher that expects that a closure throws a
319319
/// [ConcurrentModificationError].
320320
final throwsConcurrentModificationError =
321-
throwsA(new isInstanceOf<ConcurrentModificationError>());
321+
throwsA(new TypeMatcher<ConcurrentModificationError>());

test/utils.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import "package:test/test.dart";
66

7-
final Matcher throwsCastError = throwsA(new isInstanceOf<CastError>());
7+
final Matcher throwsCastError = throwsA(new TypeMatcher<CastError>());
88

99
/// A hack to determine whether we are running in a Dart 2 runtime.
1010
final bool isDart2 = _isTypeArgString('');

0 commit comments

Comments
 (0)