aboutsummaryrefslogtreecommitdiff
path: root/java/src/test
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2014-12-09 11:57:52 -0800
committerFeng Xiao <xfxyjwf@gmail.com>2014-12-09 11:57:52 -0800
commit9104da3261db96779e80f4713a50f5d19921ade8 (patch)
tree2f4739161c5a896c36f62bd2922687c489666b7d /java/src/test
parentbe20ae0b6975071563ecc61f8372fd7936f174ed (diff)
downloadprotobuf-9104da3261db96779e80f4713a50f5d19921ade8.tar.gz
protobuf-9104da3261db96779e80f4713a50f5d19921ade8.tar.bz2
protobuf-9104da3261db96779e80f4713a50f5d19921ade8.zip
Down-integrate from internal code base.
Diffstat (limited to 'java/src/test')
-rw-r--r--java/src/test/java/com/google/protobuf/MapTest.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/java/src/test/java/com/google/protobuf/MapTest.java b/java/src/test/java/com/google/protobuf/MapTest.java
index 542a20e7..9a25e302 100644
--- a/java/src/test/java/com/google/protobuf/MapTest.java
+++ b/java/src/test/java/com/google/protobuf/MapTest.java
@@ -260,6 +260,13 @@ public class MapTest extends TestCase {
assertFalse(m1.equals(m2));
// Don't check m1.hashCode() != m2.hashCode() because it's not guaranteed
// to be different.
+
+ // Regression test for b/18549190: if a map is a subset of the other map,
+ // equals() should return false.
+ b2.getMutableInt32ToInt32Field().remove(1);
+ m2 = b2.build();
+ assertFalse(m1.equals(m2));
+ assertFalse(m2.equals(m1));
}