google / auto

A collection of source code generators for Java.
Apache License 2.0
10.43k stars 1.2k forks source link

BooleanSubject failure messages are confusing when subject is null #350

Closed dborowitz closed 8 years ago

dborowitz commented 8 years ago

This test:

Boolean b = null;
assertThat(b).isFalse();

results in "The subject was expected to be false, but was true". No it's not; it's null.

Similarly, this test:

Boolean b = null;
assertThat(b).isTrue();

results in "The subject was expected to be true, but was false".

JakeWharton commented 8 years ago

I think you meant to file this on https://github.com/google/truth/

dborowitz commented 8 years ago

So sorry! Chrome addressbar autocomplete fail.