OLD | NEW |
| (Empty) |
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 | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 library matcher.operator_matchers_test; | |
6 | |
7 import 'package:matcher/matcher.dart'; | |
8 import 'package:unittest/unittest.dart' show test, group; | |
9 | |
10 import 'test_utils.dart'; | |
11 | |
12 void main() { | |
13 initUtils(); | |
14 | |
15 test('anyOf', () { | |
16 shouldFail(0, anyOf([equals(1), equals(2)]), | |
17 "Expected: (<1> or <2>) Actual: <0>"); | |
18 shouldPass(1, anyOf([equals(1), equals(2)])); | |
19 }); | |
20 | |
21 test('allOf', () { | |
22 shouldPass(1, allOf([lessThan(10), greaterThan(0)])); | |
23 shouldFail(-1, allOf([lessThan(10), greaterThan(0)]), | |
24 "Expected: (a value less than <10> and a value greater than <0>) " | |
25 "Actual: <-1> " | |
26 "Which: is not a value greater than <0>"); | |
27 }); | |
28 } | |
OLD | NEW |