Fixed a bug in SqlTimestampTest#testDateComparison() where it would fail if the milliseconds portion of the current Date was 000. We switched the 000 to 001 to fix a previous bug, but it introduced a new bug later in the code. Ultimately, this test should use a series of defined timestamps and test for specific scenarios instead of using the current time. Patch by: jlabanca Review by: jat(desk) git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@5673 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/test/com/google/gwt/emultest/java/sql/SqlTimestampTest.java b/user/test/com/google/gwt/emultest/java/sql/SqlTimestampTest.java index 6213650..cb77943 100644 --- a/user/test/com/google/gwt/emultest/java/sql/SqlTimestampTest.java +++ b/user/test/com/google/gwt/emultest/java/sql/SqlTimestampTest.java
@@ -71,7 +71,7 @@ } Timestamp t2 = new Timestamp(d.getTime()); - t2.setNanos(2); + t2.setNanos(t.getNanos() + 1); assertFalse("t.equals(t2)", t.equals(t2)); assertEquals("hashcode2", t.hashCode(), t2.hashCode());