| 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 '../../../pkg/unittest/lib/unittest.dart'; |
| 7 part 'test_utils.dart'; | 7 part 'test_utils.dart'; |
| 8 | 8 |
| 9 doesNotThrow() {} | 9 doesNotThrow() {} |
| 10 doesThrow() { throw 'X'; } | 10 doesThrow() { throw 'X'; } |
| 11 | 11 |
| 12 class PrefixMatcher extends BaseMatcher { | 12 class PrefixMatcher extends BaseMatcher { |
| 13 final String _prefix; | 13 final String _prefix; |
| 14 const PrefixMatcher(this._prefix); | 14 const PrefixMatcher(this._prefix); |
| 15 bool matches(item, MatchState matchState) { | 15 bool matches(item, MatchState matchState) { |
| 16 return item is String && | 16 return item is String && |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 var w = new Widget(); | 527 var w = new Widget(); |
| 528 w.price = 10; | 528 w.price = 10; |
| 529 shouldPass(w, new HasPrice(greaterThan(0))); | 529 shouldPass(w, new HasPrice(greaterThan(0))); |
| 530 shouldFail(w, new HasPrice(greaterThan(10)), | 530 shouldFail(w, new HasPrice(greaterThan(10)), |
| 531 'Expected: Widget with a price that is a value greater than <10> ' | 531 'Expected: Widget with a price that is a value greater than <10> ' |
| 532 'but: price was <10>.'); | 532 'but: price was <10>.'); |
| 533 }); | 533 }); |
| 534 }); | 534 }); |
| 535 } | 535 } |
| 536 | 536 |
| OLD | NEW |