Skip to content

Commit 85fa9df

Browse files
committed
propcheck: Making it Dart 2 and Dart 1 compatible
1 parent 9cafe27 commit 85fa9df

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

example/demolib.dart

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

66
library demolib;
77

8-
import 'package:collection/equality.dart';
8+
import 'package:collection/collection.dart';
99

1010
bool listEquals(List xs, List ys) => const ListEquality().equals(xs, ys);
1111
List reverse(List xs) => xs.reversed.toList();

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ environment:
88
dependencies:
99
enumerators: '>=0.6.0 <0.7.0'
1010
dev_dependencies:
11-
collection: '>=0.9.3 <0.10.0'
12-
unittest: '>=0.9.0 <1.0.0'
11+
collection: '>=0.9.3 <1.15.0'
12+
test: '>=0.9.0 <=1.3.0'

test/quickcheck_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void falseTriggersException() {
2323
return false;
2424
}
2525
expect(() => new QuickCheck(quiet: true).check(forall(c.ints, test)),
26-
throwsA(new isInstanceOf<String>()));
26+
throwsA(const TypeMatcher<String>()));
2727
}
2828

2929
void quickCheckHonorsMaxSize() {

test/smallcheck_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void falseTriggersException() {
2222
return false;
2323
}
2424
expect(() => new SmallCheck(quiet: true).check(forall(c.ints, test)),
25-
throwsA(new isInstanceOf<String>()));
25+
throwsA(const TypeMatcher<String>()));
2626
}
2727

2828
void smallCheckIsExhaustive() {

0 commit comments

Comments
 (0)