| 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 unittestTests; | 5 library unittestTests; |
| 6 import 'package:unittest/unittest.dart'; | 6 import 'package:unittest/unittest.dart'; |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 part 'test_utils.dart'; | 9 part 'test_utils.dart'; |
| 10 | 10 |
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 shouldFail(0, predicate((x) => x is String, "an instance of String"), | 700 shouldFail(0, predicate((x) => x is String, "an instance of String"), |
| 701 "Expected: an instance of String but: was <0>."); | 701 "Expected: an instance of String but: was <0>."); |
| 702 shouldPass('cow', predicate((x) => x is String, "an instance of String")); | 702 shouldPass('cow', predicate((x) => x is String, "an instance of String")); |
| 703 }); | 703 }); |
| 704 }); | 704 }); |
| 705 | 705 |
| 706 group('Feature Matchers', () { | 706 group('Feature Matchers', () { |
| 707 test("Feature Matcher", () { | 707 test("Feature Matcher", () { |
| 708 var w = new Widget(); | 708 var w = new Widget(); |
| 709 w.price = 10; | 709 w.price = 10; |
| 710 shouldPass(w, new HasPrice(10)); |
| 710 shouldPass(w, new HasPrice(greaterThan(0))); | 711 shouldPass(w, new HasPrice(greaterThan(0))); |
| 711 shouldFail(w, new HasPrice(greaterThan(10)), | 712 shouldFail(w, new HasPrice(greaterThan(10)), |
| 712 'Expected: Widget with a price that is a value greater than <10> ' | 713 'Expected: Widget with a price that is a value greater than <10> ' |
| 713 'but: price was <10>.'); | 714 'but: price was <10>.'); |
| 714 }); | 715 }); |
| 715 }); | 716 }); |
| 716 } | 717 } |
| 717 | 718 |
| OLD | NEW |