History log of /libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ArrayDequeTest.java
Revision Date Author Comments
508f0abe4f8686d29466b2c364cb4f60bf0484b5 16-Jan-2017 Tobias Thierer <tobiast@google.com> Basic tests for wrapper Collection factories in java.util.Collections

Basic test coverage for the wrapper Collections constructed by
the following static factory methods in java.util.Collections:

checkedNavigableMap()
checkedNavigableSet()
checkedQueue()
emptyNavigableMap()
emptyNavigableSet()
emptySortedMap()
emptySortedSet()
synchronizedNavigableMap()
synchronizedNavigableSet()
unmodifiableNavigableMap()
unmodifiableNavigableSet()

These 11 methods under test are the only ones currently annotated
@hide in Collections.java; this CL provides sufficient test coverage
for those to be un-hidden in a follow-up CL.

Most (perhaps all) aspects covered by these tests are also covered
by guava-testlib-21.0 tests, but those are not yet available in
AOSP and would take 80min to run, whereas these new tests only take
a few seconds to run.

SpliteratorTester previously contained some overly strict assertions
that Spliterator.trySplit() != null. This CL relaxes this assumption
for non-empty spliterables but adds a separate assertSupportsTrySplit()
check in the places that previously exercised this strict test logic;
Where the old tests appeared to be testing the wrong collection (e.g.
in HashSetTest), this CL asserts the support for trySplit on what
appears to be the correct Collection, but does not otherwise fix the
existing test code.

Bug: 29935305
Test: CtsLibcoreTestCases
Change-Id: Ibeac242bb60df7b06a1c8c80dc744707f734d91c
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
a73ca5822d77cff8b675ead6e5a3ad190183ba1c 04-Mar-2016 Narayan Kamath <narayan@google.com> Add java.lang.Iterable.spliterator() and supporting classes (part 2).

A git snafu meant that the delta between PS9 and PS10 of the aosp
commit this was cherry-picked from did not make it to nyc-dev. This
change commits that delta.

bug: 27426688
Change-Id: I18e9f8ea397ab5463a5ff671167feaa20512afa5
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
a71c780559190439211e731ea8ecf1e0291685d9 04-Mar-2016 Narayan Kamath <narayan@google.com> Fix ArrayDeque forEachRemaining tests.

bug: 27426688

(cherry picked from commit 3de87b847fa94cce9beaf5b225404c1bc7ec475f)

Change-Id: Id5703cf10a673f2bb0caba6ded0fec12a468c674
3de87b847fa94cce9beaf5b225404c1bc7ec475f 04-Mar-2016 Narayan Kamath <narayan@google.com> Fix ArrayDeque forEachRemaining tests.

Change-Id: Ibcc637d77d6ae1332fc9cc99e3915f23482db5a8
3984cdba314a0f7b0587000dec99ff26fd9bcbb5 02-Mar-2016 Narayan Kamath <narayan@google.com> Add Iterator.forEachRemaining / Iterator.remove.

Also pulls in various specializations from concrete subclasses.

bug: 27426688

(cherry picked from commit e633814ad4dc6c7dc0c34080292c2c9622cbd5a3)

Change-Id: Ic778fb61768ec2495e1ac17029afbdfd97d5e6db
e633814ad4dc6c7dc0c34080292c2c9622cbd5a3 02-Mar-2016 Narayan Kamath <narayan@google.com> Add Iterator.forEachRemaining / Iterator.remove.

Also pulls in various specializations from concrete subclasses.

bug: 27426688
Change-Id: I4d37bb61973447b5621fc2b389a04d40666a941d
ab762bb740405d0fefcccf4a0899a234f995be13 15-Nov-2013 Narayan Kamath <narayan@google.com> Move tests from tests/api to harmony-tests. (Take 2)

This reverts commit d5e281743e55e1daa297fd8043b2d9b6e8e1bed2.

The makefile issue that caused the original build break
has been resolved.
d5e281743e55e1daa297fd8043b2d9b6e8e1bed2 15-Nov-2013 Narayan Kamath <narayan@google.com> Revert "Move tests from tests/api to harmony-tests."

This reverts commit 81bf28ad31131815d0a36a43a0eca3c29aefdfcd.

Breaks build

Change-Id: I3f1562921ffe8fdbec36971dd65db398c27c92db
81bf28ad31131815d0a36a43a0eca3c29aefdfcd 15-Nov-2013 Narayan Kamath <narayan@google.com> Move tests from tests/api to harmony-tests.

The vast majority of cleaned up harmony tests
are now in harmony-tests/src/test/org/apache/harmony/tests/

Change-Id: I56c2e484ff434b5618cf6751d602ae9f0db96b30