| Index: pkg/matcher/test/matchers_minified_test.dart
|
| diff --git a/pkg/unittest/test/matchers_minified_test.dart b/pkg/matcher/test/matchers_minified_test.dart
|
| similarity index 88%
|
| copy from pkg/unittest/test/matchers_minified_test.dart
|
| copy to pkg/matcher/test/matchers_minified_test.dart
|
| index 0edd3e35f7064b19fa46f73ce8eced238bde78da..e071c096db9995ee3dbfccb450f9a5ea12ffef1f 100644
|
| --- a/pkg/unittest/test/matchers_minified_test.dart
|
| +++ b/pkg/matcher/test/matchers_minified_test.dart
|
| @@ -6,7 +6,8 @@
|
| // These tests normally fail when run in minified dart2js, since the names will
|
| // be mangled. This version of the file is modified to expect minified names.
|
|
|
| -import 'package:unittest/unittest.dart';
|
| +import 'package:matcher/matcher.dart';
|
| +import 'package:unittest/unittest.dart' as ut;
|
|
|
| import 'test_common.dart';
|
| import 'test_utils.dart';
|
| @@ -17,8 +18,8 @@ final _minifiedName = r"[A-Za-z0-9]{1,3}";
|
| void main() {
|
| initUtils();
|
|
|
| - group('Core matchers', () {
|
| - test('throwsFormatException', () {
|
| + ut.group('Core matchers', () {
|
| + ut.test('throwsFormatException', () {
|
| shouldPass(() { throw new FormatException(''); },
|
| throwsFormatException);
|
| shouldFail(() { throw new Exception(); },
|
| @@ -29,7 +30,7 @@ void main() {
|
| r"Which: threw " + _minifiedName + r":<Exception>"));
|
| });
|
|
|
| - test('throwsArgumentError', () {
|
| + ut.test('throwsArgumentError', () {
|
| shouldPass(() { throw new ArgumentError(''); },
|
| throwsArgumentError);
|
| shouldFail(() { throw new Exception(); },
|
| @@ -40,7 +41,7 @@ void main() {
|
| r"Which: threw " + _minifiedName + r":<Exception>"));
|
| });
|
|
|
| - test('throwsRangeError', () {
|
| + ut.test('throwsRangeError', () {
|
| shouldPass(() { throw new RangeError(0); },
|
| throwsRangeError);
|
| shouldFail(() { throw new Exception(); },
|
| @@ -51,7 +52,7 @@ void main() {
|
| r"Which: threw " + _minifiedName + r":<Exception>"));
|
| });
|
|
|
| - test('throwsNoSuchMethodError', () {
|
| + ut.test('throwsNoSuchMethodError', () {
|
| shouldPass(() {
|
| throw new NoSuchMethodError(null, const Symbol(''), null, null);
|
| }, throwsNoSuchMethodError);
|
| @@ -63,7 +64,7 @@ void main() {
|
| r"Which: threw " + _minifiedName + r":<Exception>"));
|
| });
|
|
|
| - test('throwsUnimplementedError', () {
|
| + ut.test('throwsUnimplementedError', () {
|
| shouldPass(() { throw new UnimplementedError(''); },
|
| throwsUnimplementedError);
|
| shouldFail(() { throw new Exception(); },
|
| @@ -74,7 +75,7 @@ void main() {
|
| r"Which: threw " + _minifiedName + r":<Exception>"));
|
| });
|
|
|
| - test('throwsUnsupportedError', () {
|
| + ut.test('throwsUnsupportedError', () {
|
| shouldPass(() { throw new UnsupportedError(''); },
|
| throwsUnsupportedError);
|
| shouldFail(() { throw new Exception(); },
|
| @@ -85,7 +86,7 @@ void main() {
|
| r"Which: threw " + _minifiedName + r":<Exception>"));
|
| });
|
|
|
| - test('throwsStateError', () {
|
| + ut.test('throwsStateError', () {
|
| shouldPass(() { throw new StateError(''); },
|
| throwsStateError);
|
| shouldFail(() { throw new Exception(); },
|
| @@ -97,8 +98,8 @@ void main() {
|
| });
|
| });
|
|
|
| - group('Iterable Matchers', () {
|
| - test('isEmpty', () {
|
| + ut.group('Iterable Matchers', () {
|
| + ut.test('isEmpty', () {
|
| var d = new SimpleIterable(0);
|
| var e = new SimpleIterable(1);
|
| shouldPass(d, isEmpty);
|
| @@ -106,7 +107,7 @@ void main() {
|
| matches(r"Expected: empty +Actual: " + _minifiedName + r":\[1\]"));
|
| });
|
|
|
| - test('contains', () {
|
| + ut.test('contains', () {
|
| var d = new SimpleIterable(3);
|
| shouldPass(d, contains(2));
|
| shouldFail(d, contains(5),
|
| @@ -116,8 +117,8 @@ void main() {
|
| });
|
| });
|
|
|
| - group('Feature Matchers', () {
|
| - test("Feature Matcher", () {
|
| + ut.group('Feature Matchers', () {
|
| + ut.test("Feature Matcher", () {
|
| var w = new Widget();
|
| w.price = 10;
|
| shouldPass(w, new HasPrice(10));
|
|
|