Skip to content

Commit

Permalink
Deprecate SortedMapSubject and SortedSetSubject.
Browse files Browse the repository at this point in the history
#556

RELNOTES=Deprecated `SortedMapSubject` and `SortedSetSubject`. Users will have to perform assertions directly on the result of methods like `firstKey`. We haven't found sufficient demand for the classes to keep them.
  • Loading branch information
travis-ci committed May 29, 2019
1 parent 36200e6 commit 46aebcf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@
/**
* Tests for {@link SortedMap} and {@link NavigableMap} objects. This class supports assertions
* based on {@code NavigableMap}'s API even if the subject only implements {@code SortedMap}.
*
* @deprecated Perform assertions directly on the result of methods like {@code firstKey}. We
* haven't found sufficient demand for this class to keep it.
*/
// TODO(diamondm): identify use-cases for assertions on other NavigableMap methods, such as
// ceilingKey(), and propose an API to support such assertions.
@Deprecated
public final class SortedMapSubject extends MapSubject {
private final NavigableMap<?, ?> actualAsNavigableMap;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@
/**
* Tests for {@link SortedSet} and {@link NavigableSet} objects. This class supports assertions
* based on {@code NavigableSet}'s API even if the subject only implements {@code SortedSet}.
*
* @deprecated Perform assertions directly on the result of methods like {@code first}. We haven't
* found sufficient demand for this class to keep it.
*/
// TODO(diamondm): identify use-cases for assertions on other NavigableSet methods, such as
// ceiling(), and propose an API to support such assertions.
@Deprecated
public final class SortedSetSubject extends IterableSubject {
private final NavigableSet<?> actualAsNavigableSet;

Expand Down

0 comments on commit 46aebcf

Please sign in to comment.