Skip to content

Commit

Permalink
Deprecate the mirror matchers library (flutter#131)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
natebosch authored Mar 11, 2020
1 parent 4b01524 commit af4fe7d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 0.12.7-dev
## 0.12.7

- Deprecate the `mirror_matchers.dart` library.
- Update minimum Dart SDK to `2.4.0`.

## 0.12.6
Expand Down
3 changes: 3 additions & 0 deletions lib/mirror_matchers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

@deprecated
library mirror_matchers;

/// The mirror matchers library provides some additional matchers that
/// make use of `dart:mirrors`.
import 'dart:mirrors';
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: matcher
version: 0.12.7-dev
version: 0.12.7

description: >-
Support for specifying test expectations via an extensible Matcher class.
Expand Down
2 changes: 2 additions & 0 deletions test/mirror_matchers_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// ignore_for_file: deprecated_member_use_from_same_package

@TestOn('vm')

import 'package:matcher/mirror_matchers.dart';
Expand Down

0 comments on commit af4fe7d

Please sign in to comment.