You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!getSubject().get().equals(expected)) {
if (getSubject().get() instanceof String) {
this.failureStrategy.failComparing("Optional<String> has an incorrect value.",
(String) expected, (String) actual);
The text was updated successfully, but these errors were encountered:
if (!getSubject().get().equals(expected)) {
if (getSubject().get() instanceof String) {
this.failureStrategy.failComparing("Optional has an incorrect value.",
(String) expected, (String) actual);
—
Reply to this email directly or view it on GitHub #156.
…lue().
See #156
Remove String special casing and include actual output in isPresent()/isAbsent() failure messages.
Update throw/catch expected/fail pattern to avoid fail() / catch (AssertionError) trickiness.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=80217696
assertThat(someOptionalFoobarString).named("FroBar").hasValue(expected);
results in "Optional has an incorrect value. expected: but was:".
What happened to the custom name "FooBar"? Looks like it's simply ignored:
https://github.com/google/truth/blob/master/core/src/main/java/com/google/common/truth/OptionalSubject.java#L61-L64
The text was updated successfully, but these errors were encountered: