| 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.test_utils; | |
| 6 | |
| 7 import 'dart:collection'; | 5 import 'dart:collection'; |
| 8 | 6 |
| 9 import 'package:test/test.dart'; | 7 import 'package:test/test.dart'; |
| 10 | 8 |
| 11 void shouldFail(value, Matcher matcher, expected) { | 9 void shouldFail(value, Matcher matcher, expected) { |
| 12 var failed = false; | 10 var failed = false; |
| 13 try { | 11 try { |
| 14 expect(value, matcher); | 12 expect(value, matcher); |
| 15 } on TestFailure catch (err) { | 13 } on TestFailure catch (err) { |
| 16 failed = true; | 14 failed = true; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 _current = _count; | 75 _current = _count; |
| 78 _count--; | 76 _count--; |
| 79 return true; | 77 return true; |
| 80 } | 78 } |
| 81 _current = null; | 79 _current = null; |
| 82 return false; | 80 return false; |
| 83 } | 81 } |
| 84 | 82 |
| 85 int get current => _current; | 83 int get current => _current; |
| 86 } | 84 } |
| OLD | NEW |