From 29a0be6fe856e00583086cf557c1960dacc19e90 Mon Sep 17 00:00:00 2001 From: Stargator Date: Fri, 6 Jul 2018 19:14:44 -0400 Subject: [PATCH 1/2] propcheck: Making it Dart 2 and Dart 1 compatible --- pubspec.yaml | 2 +- test/quickcheck_test.dart | 2 +- test/smallcheck_test.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 018237f..a1718ca 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,4 +9,4 @@ dependencies: enumerators: '>=0.6.0 <0.7.0' dev_dependencies: collection: '>=1.4.0 <1.15.0' - unittest: '>=0.9.0 <0.10.0' + test: '>=0.9.0 <=1.3.0' diff --git a/test/quickcheck_test.dart b/test/quickcheck_test.dart index 34a2303..9d492b3 100644 --- a/test/quickcheck_test.dart +++ b/test/quickcheck_test.dart @@ -23,7 +23,7 @@ void falseTriggersException() { return false; } expect(() => new QuickCheck(quiet: true).check(forall(c.ints, test)), - throwsA(new isInstanceOf())); + throwsA(const TypeMatcher())); } void quickCheckHonorsMaxSize() { diff --git a/test/smallcheck_test.dart b/test/smallcheck_test.dart index 38818ee..d5ce998 100644 --- a/test/smallcheck_test.dart +++ b/test/smallcheck_test.dart @@ -22,7 +22,7 @@ void falseTriggersException() { return false; } expect(() => new SmallCheck(quiet: true).check(forall(c.ints, test)), - throwsA(new isInstanceOf())); + throwsA(const TypeMatcher())); } void smallCheckIsExhaustive() { From 461c206838555624a0e20213a04e7e7a2accb5dc Mon Sep 17 00:00:00 2001 From: Stargator Date: Wed, 11 Jul 2018 11:14:54 -0400 Subject: [PATCH 2/2] propcheck: Move the imports to use test package --- example/demo.dart | 2 +- example/mirrors_demo.dart | 2 +- test/mirrors_test.dart | 2 +- test/quickcheck_test.dart | 2 +- test/smallcheck_test.dart | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example/demo.dart b/example/demo.dart index 49cc91c..f082d04 100644 --- a/example/demo.dart +++ b/example/demo.dart @@ -8,7 +8,7 @@ library demo; import 'demolib.dart'; import 'package:propcheck/propcheck.dart'; import 'package:enumerators/combinators.dart' as c; -import 'package:unittest/unittest.dart' hide equals; +import 'package:test/test.dart' hide equals; /* --- the properties to test --- */ diff --git a/example/mirrors_demo.dart b/example/mirrors_demo.dart index eeec688..e387ac3 100644 --- a/example/mirrors_demo.dart +++ b/example/mirrors_demo.dart @@ -2,7 +2,7 @@ library mirrors_demo; import 'demolib.dart'; import 'package:propcheck/propcheck_mirrors.dart'; -import 'package:unittest/unittest.dart' hide equals; +import 'package:test/test.dart' hide equals; /* --- the properties to test --- */ diff --git a/test/mirrors_test.dart b/test/mirrors_test.dart index 29455a0..f359b92 100644 --- a/test/mirrors_test.dart +++ b/test/mirrors_test.dart @@ -6,7 +6,7 @@ import 'package:propcheck/propcheck_mirrors.dart'; import 'package:enumerators/combinators.dart' as c; import 'package:enumerators/enumerators.dart' as e; -import 'package:unittest/unittest.dart'; +import 'package:test/test.dart'; bool boolArgument(bool x) => true; bool intArgument(int x) => true; diff --git a/test/quickcheck_test.dart b/test/quickcheck_test.dart index 9d492b3..d5e6b5d 100644 --- a/test/quickcheck_test.dart +++ b/test/quickcheck_test.dart @@ -6,7 +6,7 @@ import 'package:propcheck/propcheck.dart'; import 'package:enumerators/combinators.dart' as c; import 'package:enumerators/enumerators.dart' as e; -import 'package:unittest/unittest.dart'; +import 'package:test/test.dart'; void quickCheckPerformsCheck() { bool called = false; diff --git a/test/smallcheck_test.dart b/test/smallcheck_test.dart index d5ce998..91ce9b5 100644 --- a/test/smallcheck_test.dart +++ b/test/smallcheck_test.dart @@ -5,7 +5,7 @@ import 'package:propcheck/propcheck.dart'; import 'package:enumerators/combinators.dart' as c; -import 'package:unittest/unittest.dart'; +import 'package:test/test.dart'; void smallCheckPerformsCheck() { bool called = false;