osama-raddad/android-test-kit

Support comparing CharSequences which are not Strings (patch included)

Closed this issue · 2 comments

Please merge from 
https://code.google.com/r/sschuberth-android-test-kit/source/detail?r=b5280ddfdd
b8dd355a0a5bf53b1b646c2d3a9f3b

If the TextView happens to return a CharSequence which is not a String,
expectedText.equals(textView.getText()) would return false, even if a
CharSequence containing the exact same sequence of characters was returned.
TextUtils.isEqual will fall back to a char-by-char comparison in this case,
avoiding false negative matches.

Original issue reported on code.google.com by sschuberth on 28 May 2014 at 2:45

Thanks for the patch.

Original comment by vale...@google.com on 9 Jun 2014 at 9:41

  • Changed state: Accepted
Fixed in Espresso 2.0

Original comment by vale...@google.com on 20 Dec 2014 at 4:33

  • Changed state: Fixed