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