-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make "value of" lines work with
StreamSubject
.
...by migrating off the deprecated no-arg `check()` overload. Usages of that method [cause problems for "value of" lines](https://github.com/google/truth/blob/37fd8bea90c0ab4528c4c922c88fa176eb45f65b/core/src/main/java/com/google/common/truth/FailureMetadata.java#L230-L232). Also, fill in a `typeDescriptionOverride` value for `MultisetSubject`. This is largely a no-op, but it helps under GWT/J2CL (where [we can't infer the type name](https://github.com/google/truth/blob/37fd8bea90c0ab4528c4c922c88fa176eb45f65b/core/src/main/java/com/google/common/truth/super/com/google/common/truth/Platform.java#L72)). I left `IterableSubject` itself without a `typeDescriptionOverride`, since it has subclasses outside the package, some of which may prefer the more specific names (which are normally automatically derived from the `Subject` class's name—e.g., `AttributeListSubject` would result in `value of: attributeList.size()`). In hindsight, I guess that I could have given _direct_ usages of `IterableSubject` a `typeDescriptionOverride` (by making `StandardSubjectBuilder` pass one), but that seems like more effort than is worthwhile now that I've already tested this CL as it stands. RELNOTES=n/a PiperOrigin-RevId: 598964798
- Loading branch information
Showing
4 changed files
with
21 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters