| 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.string_matchers_test; | 5 library matcher.string_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, expect; | 8 import 'package:test/test.dart' show test, group, expect; |
| 9 | 9 |
| 10 import 'test_utils.dart'; | 10 import 'test_utils.dart'; |
| 11 | 11 |
| 12 void main() { | 12 void main() { |
| 13 test('Reports mismatches in whitespace and escape sequences', () { | 13 test('Reports mismatches in whitespace and escape sequences', () { |
| 14 shouldFail('before\nafter', equals('before\\nafter'), | 14 shouldFail('before\nafter', equals('before\\nafter'), |
| 15 contains('Differ at offset 7')); | 15 contains('Differ at offset 7')); |
| 16 }); | 16 }); |
| 17 | 17 |
| 18 test('collapseWhitespace', () { | 18 test('collapseWhitespace', () { |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 "Actual: 'goodbye cruel world'"); | 104 "Actual: 'goodbye cruel world'"); |
| 105 }); | 105 }); |
| 106 | 106 |
| 107 test('matches', () { | 107 test('matches', () { |
| 108 shouldPass('c0d', matches('[a-z][0-9][a-z]')); | 108 shouldPass('c0d', matches('[a-z][0-9][a-z]')); |
| 109 shouldPass('c0d', matches(new RegExp('[a-z][0-9][a-z]'))); | 109 shouldPass('c0d', matches(new RegExp('[a-z][0-9][a-z]'))); |
| 110 shouldFail('cOd', matches('[a-z][0-9][a-z]'), | 110 shouldFail('cOd', matches('[a-z][0-9][a-z]'), |
| 111 "Expected: match '[a-z][0-9][a-z]' Actual: 'cOd'"); | 111 "Expected: match '[a-z][0-9][a-z]' Actual: 'cOd'"); |
| 112 }); | 112 }); |
| 113 } | 113 } |
| OLD | NEW |