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

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

Issue 16374002: Mark the "completes" matcher as final. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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/scheduled_test/lib/src/scheduled_future_matchers.dart ('k') | no next file » | 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 part of matcher; 5 part of matcher;
6 6
7 /** 7 /**
8 * Matches a [Future] that completes successfully with a value. Note that this 8 * Matches a [Future] that completes successfully with a value. Note that this
9 * creates an asynchronous expectation. The call to `expect()` that includes 9 * creates an asynchronous expectation. The call to `expect()` that includes
10 * this will return immediately and execution will continue. Later, when the 10 * this will return immediately and execution will continue. Later, when the
11 * future completes, the actual expectation will run. 11 * future completes, the actual expectation will run.
12 * 12 *
13 * To test that a Future completes with an exception, you can use [throws] and 13 * To test that a Future completes with an exception, you can use [throws] and
14 * [throwsA]. 14 * [throwsA].
15 */ 15 */
16 Matcher completes = const _Completes(null, ''); 16 final Matcher completes = const _Completes(null, '');
17 17
18 /** 18 /**
19 * Matches a [Future] that completes succesfully with a value that matches 19 * Matches a [Future] that completes succesfully with a value that matches
20 * [matcher]. Note that this creates an asynchronous expectation. The call to 20 * [matcher]. Note that this creates an asynchronous expectation. The call to
21 * `expect()` that includes this will return immediately and execution will 21 * `expect()` that includes this will return immediately and execution will
22 * continue. Later, when the future completes, the actual expectation will run. 22 * continue. Later, when the future completes, the actual expectation will run.
23 * 23 *
24 * To test that a Future completes with an exception, you can use [throws] and 24 * To test that a Future completes with an exception, you can use [throws] and
25 * [throwsA]. 25 * [throwsA].
26 * 26 *
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 Description describe(Description description) { 61 Description describe(Description description) {
62 if (_matcher == null) { 62 if (_matcher == null) {
63 description.add('completes successfully'); 63 description.add('completes successfully');
64 } else { 64 } else {
65 description.add('completes to a value that ').addDescriptionOf(_matcher); 65 description.add('completes to a value that ').addDescriptionOf(_matcher);
66 } 66 }
67 return description; 67 return description;
68 } 68 }
69 } 69 }
OLDNEW
« no previous file with comments | « pkg/scheduled_test/lib/src/scheduled_future_matchers.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698