http://gwt-code-reviews.appspot.com/771801/diff/25001/26015
File user/test/com/google/gwt/safehtml/shared/GwtSafeHtmlStringTest.java
(right):

http://gwt-code-reviews.appspot.com/771801/diff/25001/26015#newcode40
user/test/com/google/gwt/safehtml/shared/GwtSafeHtmlStringTest.java:40:
assertFalse(safe1.hashCode() == safe3.hashCode());
You can avoid the assertFalse by rewriting the tests like this:

assertEquals("stringsame".hashCode(), safe1.hashCode());
assertEquals(safe1.hashCode(), safe2.hashCode());
assertEquals("stringdiff".hashCode(), safe3.hashCode());

You don't really need to assert that "stringsame" and "stringdiff" have
different hash codes.

On 2010/08/19 18:35:55, rice wrote:
Assert safe1.hashCode() == "stringsame".hashCode?

Also, it's better to use:

assertEquals(expected, actual)

rather than:

assertTrue(expected == actual)

because the failure message will provide better information

http://gwt-code-reviews.appspot.com/771801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to