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

Side by Side Diff: test/iterable_matchers_test.dart

Issue 867133002: pkg/matcher: refactor with unittest v0.12 work (Closed) Base URL: https://github.com/dart-lang/matcher.git@master
Patch Set: cl nits Created 5 years, 10 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/future_matchers_test.dart ('k') | test/matchers_minified_test.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.iterable_matchers_test; 5 library matcher.iterable_matchers_test;
6 6
7 import 'package:matcher/matcher.dart'; 7 import 'package:matcher/matcher.dart';
8 import 'package:unittest/unittest.dart' show test, group; 8 import 'package:unittest/unittest.dart' show test, group;
9 9
10 import 'test_utils.dart'; 10 import 'test_utils.dart';
11 11
12 void main() { 12 void main() {
13 initUtils();
14
15 test('isEmpty', () { 13 test('isEmpty', () {
16 shouldPass([], isEmpty); 14 shouldPass([], isEmpty);
17 shouldFail([1], isEmpty, "Expected: empty Actual: [1]"); 15 shouldFail([1], isEmpty, "Expected: empty Actual: [1]");
18 }); 16 });
19 17
20 test('isNotEmpty', () { 18 test('isNotEmpty', () {
21 shouldFail([], isNotEmpty, "Expected: non-empty Actual: []"); 19 shouldFail([], isNotEmpty, "Expected: non-empty Actual: []");
22 shouldPass([1], isNotEmpty); 20 shouldPass([1], isNotEmpty);
23 }); 21 });
24 22
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 "Expected: pairwise less than [1, 4, 9] " 155 "Expected: pairwise less than [1, 4, 9] "
158 "Actual: [1, 2, 3] " 156 "Actual: [1, 2, 3] "
159 "Which: has <1> which is not less than <1> at index 0"); 157 "Which: has <1> which is not less than <1> at index 0");
160 shouldPass(d, pairwiseCompare(e, (e, a) => a * a == e, "square root of")); 158 shouldPass(d, pairwiseCompare(e, (e, a) => a * a == e, "square root of"));
161 shouldFail(d, pairwiseCompare(e, (e, a) => a + a == e, "double"), 159 shouldFail(d, pairwiseCompare(e, (e, a) => a + a == e, "double"),
162 "Expected: pairwise double [1, 4, 9] " 160 "Expected: pairwise double [1, 4, 9] "
163 "Actual: [1, 2, 3] " 161 "Actual: [1, 2, 3] "
164 "Which: has <1> which is not double <1> at index 0"); 162 "Which: has <1> which is not double <1> at index 0");
165 }); 163 });
166 } 164 }
OLDNEW
« no previous file with comments | « test/future_matchers_test.dart ('k') | test/matchers_minified_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698