@@ -55,15 +55,15 @@ void main() {
5555 test ("can be called freely up to the limit" , () {
5656 var pool = new Pool (50 );
5757 for (var i = 0 ; i < 50 ; i++ ) {
58- pool.withResource (expectAsync (() => new Completer ().future));
58+ pool.withResource (expectAsync0 (() => new Completer ().future));
5959 }
6060 });
6161
6262 test ("blocks the callback past the limit" , () {
6363 new FakeAsync ().run ((async ) {
6464 var pool = new Pool (50 );
6565 for (var i = 0 ; i < 50 ; i++ ) {
66- pool.withResource (expectAsync (() => new Completer ().future));
66+ pool.withResource (expectAsync0 (() => new Completer ().future));
6767 }
6868 pool.withResource (expectNoAsync ());
6969
@@ -75,7 +75,7 @@ void main() {
7575 new FakeAsync ().run ((async ) {
7676 var pool = new Pool (50 );
7777 for (var i = 0 ; i < 49 ; i++ ) {
78- pool.withResource (expectAsync (() => new Completer ().future));
78+ pool.withResource (expectAsync0 (() => new Completer ().future));
7979 }
8080
8181 var completer = new Completer ();
@@ -100,7 +100,7 @@ void main() {
100100 // Regression test for #3.
101101 test ("can be called immediately before close()" , () async {
102102 var pool = new Pool (1 );
103- pool.withResource (expectAsync (() {}));
103+ pool.withResource (expectAsync0 (() {}));
104104 await pool.close ();
105105 });
106106 });
@@ -160,7 +160,7 @@ void main() {
160160 for (var i = 0 ; i < 50 ; i++ ) {
161161 expect (pool.request (), completes);
162162 }
163- expect (pool.request (), throwsA (new isInstanceOf <TimeoutException >()));
163+ expect (pool.request (), throwsA (new TypeMatcher <TimeoutException >()));
164164
165165 async .elapse (new Duration (seconds: 6 ));
166166 });
@@ -270,7 +270,7 @@ void main() {
270270 var innerZone = Zone .current;
271271 expect (innerZone, isNot (equals (outerZone)));
272272
273- resource.allowRelease (expectAsync (() {
273+ resource.allowRelease (expectAsync0 (() {
274274 expect (Zone .current, equals (innerZone));
275275 }));
276276 });
@@ -450,7 +450,7 @@ Function expectNoAsync() {
450450///
451451/// This should only be called within a [FakeAsync.run] zone.
452452Matcher get doesNotComplete => predicate ((future) {
453- expect (future, new isInstanceOf <Future >());
453+ expect (future, new TypeMatcher <Future >());
454454
455455 var stack = new Trace .current (1 );
456456 future.then ((_) => registerException (
0 commit comments