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

Side by Side Diff: test/utils.dart

Issue 1152453009: pkg/scheduled_test: fix analyzer hints (Closed) Base URL: https://github.com/dart-lang/scheduled_test.git@master
Patch Set: nits Created 5 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
« no previous file with comments | « test/scheduled_test/unhandled_error_test.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 test_utils; 5 library test_utils;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:scheduled_test/scheduled_test.dart'; 9 import 'package:scheduled_test/scheduled_test.dart';
10 import 'package:scheduled_test/src/utils.dart';
11 import 'package:test/test.dart' as test_pkg; 10 import 'package:test/test.dart' as test_pkg;
12 11
13 import 'package:metatest/metatest.dart'; 12 import 'package:metatest/metatest.dart';
14 13
15 export 'package:scheduled_test/src/utils.dart'; 14 export 'package:scheduled_test/src/utils.dart';
16 15
17 import 'mock_clock.dart'; 16 import 'mock_clock.dart';
18 17
19 /// A matcher that validates whether an object is a [TestFailure]. 18 /// A matcher that validates whether an object is a [TestFailure].
20 final isTestFailure = new isInstanceOf<TestFailure>(); 19 final isTestFailure = new isInstanceOf<TestFailure>();
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 65
67 /// Like [expectTestFails], but expects there to be only a single error and 66 /// Like [expectTestFails], but expects there to be only a single error and
68 /// unwraps that error before passing it to [validator]. 67 /// unwraps that error before passing it to [validator].
69 void expectTestFailure(String description, Future testBody(), 68 void expectTestFailure(String description, Future testBody(),
70 void validator(error)) { 69 void validator(error)) {
71 expectTestFails(description, testBody, (errors) { 70 expectTestFails(description, testBody, (errors) {
72 expect(errors, hasLength(1)); 71 expect(errors, hasLength(1));
73 validator(errors.single.error); 72 validator(errors.single.error);
74 }); 73 });
75 } 74 }
OLDNEW
« no previous file with comments | « test/scheduled_test/unhandled_error_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698