Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Side by Side Diff: pkg/matcher/lib/src/future_matchers.dart

Issue 438473002: pkg/matcher: refactored code around data-structure vs execution-based matchers (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/matcher/lib/src/expect.dart ('k') | pkg/matcher/lib/src/interfaces.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library matcher.future_matchers; 5 library matcher.future_matchers;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'core_matchers.dart';
10 import 'expect.dart'; 9 import 'expect.dart';
11 import 'interfaces.dart'; 10 import 'interfaces.dart';
11 import 'util.dart';
12 12
13 /// Matches a [Future] that completes successfully with a value. Note that this 13 /// Matches a [Future] that completes successfully with a value. Note that this
14 /// creates an asynchronous expectation. The call to `expect()` that includes 14 /// creates an asynchronous expectation. The call to `expect()` that includes
15 /// this will return immediately and execution will continue. Later, when the 15 /// this will return immediately and execution will continue. Later, when the
16 /// future completes, the actual expectation will run. 16 /// future completes, the actual expectation will run.
17 /// 17 ///
18 /// To test that a Future completes with an exception, you can use [throws] and 18 /// To test that a Future completes with an exception, you can use [throws] and
19 /// [throwsA]. 19 /// [throwsA].
20 final Matcher completes = const _Completes(null, ''); 20 final Matcher completes = const _Completes(null, '');
21 21
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 Description describe(Description description) { 62 Description describe(Description description) {
63 if (_matcher == null) { 63 if (_matcher == null) {
64 description.add('completes successfully'); 64 description.add('completes successfully');
65 } else { 65 } else {
66 description.add('completes to a value that ').addDescriptionOf(_matcher); 66 description.add('completes to a value that ').addDescriptionOf(_matcher);
67 } 67 }
68 return description; 68 return description;
69 } 69 }
70 } 70 }
OLDNEW
« no previous file with comments | « pkg/matcher/lib/src/expect.dart ('k') | pkg/matcher/lib/src/interfaces.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698