diff options
author | Narayan Kamath <narayan@google.com> | 2015-03-17 09:29:31 +0000 |
---|---|---|
committer | Narayan Kamath <narayan@google.com> | 2015-03-17 10:04:59 +0000 |
commit | 8a0d507642f3365fd2969445ba0df282e46af72d (patch) | |
tree | e37aae8e0fbb4610feffbad990e6dda853385b21 /luni | |
parent | 79c17dc2b392201f55c700781408d4af625c82a5 (diff) | |
download | libcore-8a0d507642f3365fd2969445ba0df282e46af72d.zip libcore-8a0d507642f3365fd2969445ba0df282e46af72d.tar.gz libcore-8a0d507642f3365fd2969445ba0df282e46af72d.tar.bz2 |
Add unit test for Timestamp#equals.
bug: 19756610
Change-Id: I2654643fefcb0402e34ff409c0cad1e1355cadc3
Diffstat (limited to 'luni')
-rw-r--r-- | luni/src/test/java/libcore/java/sql/TimestampTest.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/luni/src/test/java/libcore/java/sql/TimestampTest.java b/luni/src/test/java/libcore/java/sql/TimestampTest.java index 2985848..71ac8c8 100644 --- a/luni/src/test/java/libcore/java/sql/TimestampTest.java +++ b/luni/src/test/java/libcore/java/sql/TimestampTest.java @@ -144,4 +144,12 @@ public final class TimestampTest extends TestCase { } catch (IllegalArgumentException expected) { } } + // http://b/19756610 + public void testAsymmetricEquals() { + Timestamp timestamp = new Timestamp(0); + java.util.Date date = new java.util.Date(0); + + assertTrue(date.equals(timestamp)); + assertFalse(timestamp.equals(date)); + } } |