OLD | NEW |
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.core_matchers_test; | 5 library matcher.core_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:test/test.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 test('isTrue', () { | 13 test('isTrue', () { |
14 shouldPass(true, isTrue); | 14 shouldPass(true, isTrue); |
15 shouldFail(false, isTrue, "Expected: true Actual: <false>"); | 15 shouldFail(false, isTrue, "Expected: true Actual: <false>"); |
16 }); | 16 }); |
17 | 17 |
18 test('isFalse', () { | 18 test('isFalse', () { |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 w.price = 10; | 193 w.price = 10; |
194 shouldPass(w, new HasPrice(10)); | 194 shouldPass(w, new HasPrice(10)); |
195 shouldPass(w, new HasPrice(greaterThan(0))); | 195 shouldPass(w, new HasPrice(greaterThan(0))); |
196 shouldFail(w, new HasPrice(greaterThan(10)), | 196 shouldFail(w, new HasPrice(greaterThan(10)), |
197 "Expected: Widget with a price that is a value greater than <10> " | 197 "Expected: Widget with a price that is a value greater than <10> " |
198 "Actual: <Instance of 'Widget'> " | 198 "Actual: <Instance of 'Widget'> " |
199 "Which: has price with value <10> which is not " | 199 "Which: has price with value <10> which is not " |
200 "a value greater than <10>"); | 200 "a value greater than <10>"); |
201 }); | 201 }); |
202 } | 202 } |
OLD | NEW |