Skip to content

Commit af4fe7d

Browse files
authored
Deprecate the mirror matchers library (flutter#131)
I cannot find usage. Asserting that an object has a property with a known name can be accomplished by casting to `dynamic` and attempting to read from that property. Asserting that an object has a property with a name that is unknown at compile time has no known use case, if it comes up it would re rare enough that the code for using mirrors to solve it can be put into the test.
1 parent 4b01524 commit af4fe7d

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
## 0.12.7-dev
1+
## 0.12.7
22

3+
- Deprecate the `mirror_matchers.dart` library.
34
- Update minimum Dart SDK to `2.4.0`.
45

56
## 0.12.6

lib/mirror_matchers.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
@deprecated
6+
library mirror_matchers;
7+
58
/// The mirror matchers library provides some additional matchers that
69
/// make use of `dart:mirrors`.
710
import 'dart:mirrors';

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: matcher
2-
version: 0.12.7-dev
2+
version: 0.12.7
33

44
description: >-
55
Support for specifying test expectations via an extensible Matcher class.

test/mirror_matchers_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// ignore_for_file: deprecated_member_use_from_same_package
6+
57
@TestOn('vm')
68

79
import 'package:matcher/mirror_matchers.dart';

0 commit comments

Comments
 (0)