History log of /libcore/luni/src/test/java/libcore/java/util/TreeMapTest.java
Revision Date Author Comments
f0d9b8aea94c2a207b7b71faaa7a8a2f78ddf1ea 20-Apr-2016 Shubham Ajmera <shubhamajmera@google.com> Add missed overrides for OpenJDK 8 Map default methods

Both the replace methods in TreeMap were left intentionally in the
commit 0e83756c4295f4df3853047205d94fe845573522 as there were no
behavioral differences and the default implementation was considered
sufficient. However, the upstream version is more efficient so that is
being added here.

As of now, all the overrides for the Map default implementation have
been put from the upstream, except for Hashtable and HashMap. Both
of these classes are quite different from their OpenJDK 8 versions to
accommodate the overrides. HashMap depends on the default implementation
for the following methods:

#getOrDefault
#replace(K, V)
#computeIfAbsent
#computeIfPresent
#compute
#merge

#replace(K, V, V) was reimplemented due to the behavioral differences
with the default implementation.

The following Hashtable methods are also dependent on the map default
implementation, though, they have added synchronization.

#getOrDefault
#putIfAbsent
#remove
#replace(K, V, V)
#replace(K, V)
#computeIfAbsent
#computeIfPresent
#compute

Once the classes get ready with the new changes comes with OpenJDK 8,
the above methods would be put in.

Bug: 27426743
Change-Id: Iee4fb156eddee17187386bbfffc8517415030a94
135ea6cd4f7ebe2f225351a1928d8a62bce5cb00 04-Apr-2016 Shubham Ajmera <shubhamajmera@google.com> Add Map::replaceAll method

and corresponding unit test.

Bug: 27426743
Change-Id: Ia86b769fbf5ce55379325ae575d4b3818cb6ccc1
783b17f8bbc4f7077c18c2f83c2cf6d5543f2d19 11-Mar-2016 Narayan Kamath <narayan@google.com> Fix TreeMapTest#test_spliterator_valueSet.

This was an incorrect test. The set of values will only
be sized, not sorted.

bug: 27426688

(cherry picked from commit 9a910a991e203fc3435bc636f12a93107cef37a5)

Change-Id: Ic0c28ae393a63af294bdceaed3ac4766d256a683
9a910a991e203fc3435bc636f12a93107cef37a5 11-Mar-2016 Narayan Kamath <narayan@google.com> Fix TreeMapTest#test_spliterator_valueSet.

This was an incorrect test. The set of values will only
be sized, not sorted.

bug: 27426688
Change-Id: I2b3c601ed9cb7fd8435e80f02be010f84048fe08
8b056f0b15bc1e45da8d4c504353b05e681ac013 04-Mar-2016 Narayan Kamath <narayan@google.com> Add java.lang.Iterable.spliterator() and supporting classes.

The only android specific changes here are to HashMap - their
spliterators add Spliterator.ORDERED if the HashMap is an instance
of a LinkedHashMap.

There's some degree of duplication between the test code used to
exercise primitive arrays (Arrays / Spliterators provide similar
APIs). These differences are quite hard to consolidate, since the
Arrays version declares that their Spliterators are ORDERED but
the Spliterator version doesn't. The latter also allows us to declare
additional Spliterator characteristics.

bug: 27426688
Change-Id: I191a9319d4af7e22834f2d91f73634a227b36bc2
4c89023ef86f29fa9add7db2574f2169fe842577 04-Mar-2016 Narayan Kamath <narayan@google.com> Add java.lang.Iterable.spliterator() and supporting classes.

The only android specific changes here are to HashMap - their
spliterators add Spliterator.ORDERED if the HashMap is an instance
of a LinkedHashMap.

There's some degree of duplication between the test code used to
exercise primitive arrays (Arrays / Spliterators provide similar
APIs). These differences are quite hard to consolidate, since the
Arrays version declares that their Spliterators are ORDERED but
the Spliterator version doesn't. The latter also allows us to declare
additional Spliterator characteristics.

(cherry-picked from commit ed21aa3a8dcd34eca6f0317eeb683e7afdc825b9)

bug: 27426688
Change-Id: I191a9319d4af7e22834f2d91f73634a227b36bc2
78562a12977fc4d81cd31e7c5af05d66bb701ccd 05-Jan-2016 Narayan Kamath <narayan@google.com> Workaround bogus TreeMap Comparators.

Try our best not to compare elements against themselves.

**** THIS CHANGE WILL BE REVERTED IN A FUTURE ANDROID RELEASE ****

bug: 26336181
Change-Id: I67e846159c1be9e9a5595ece5a32a00ff8eacccd
b11ce5f8024d9b7a7a2b7720d48acd2db8c97ec3 10-Dec-2015 Yi Kong <yikong@google.com> Update TreeMapTest golden value

TreeMap changed serialVersionUID, updating the golden value to the new
serialized form to pass the test again.

Bug: 26023477
Change-Id: If500c85560b44f1236fb875374ea6e3dde441ffe
b416ef5dc224630af2b9393a15ae120b27e4864a 14-Dec-2011 Jesse Wilson <jessewilson@google.com> Rename SerializableTester to SerializationTester

Change-Id: Idfaea5c474eb3cabfb8eefc5aa25a7ff0cce26ea
94fab96cd4c1bd4363ba1d70b59475132ddd441e 13-Dec-2011 Jesse Wilson <jessewilson@google.com> Fix serialization of reverse-ordered TreeSets.

Bug: http://b/5552608
Change-Id: I949c2ab11fea391987217dfd5f8dad0cd3fe3fbf
4557728efb66c455a52b7669a8eefef7a9e54854 11-Aug-2010 Jesse Wilson <jessewilson@google.com> Moving tests to be under the libcore.* package.

This is indended to make it easier to run on VMs that restrict the packages
from which application classes can be loaded. For example, on the RI you need
to use the bootclasspath to load these tests.

Change-Id: I52193f35c5fcca18b5a3e1d280505b1e29b388af