diff options
author | Tobias Thierer <tobiast@google.com> | 2016-08-17 21:24:48 +0100 |
---|---|---|
committer | Tobias Thierer <tobiast@google.com> | 2016-08-18 23:32:31 +0100 |
commit | 26b39cc71ae9c0890b1c56f7062debd4b555811c (patch) | |
tree | a836799fc301391b2ccceff6dfba62c97aa241bb /annotations/generate_annotated_java_files.py | |
parent | b6f0af5267f95ad4e208f6df65c58899dc51c767 (diff) |
Comprehensive tests for bounds check in TreeMap's submaps.
AOSP commit b4105e7f1e3ab24131976f68be4554e694a0e1d4 established
bounds checking behavior for TreeMap.{tail,head}map() in Android N
that matches the behavior in earlier versions of Android. This
behavior is covered by the existing comprehensive TreeMapExtendTest
but that test is hard to follow since it's over 13k lines long
and somewhat convoluted (no comments). This makes it hard to verify
whether a particular case is covered by the test or understand why
a test may be failing.
This CL adds comprehensive, documented tests for all 16 possible
combinations of an (inclusive, exclusive) (head, tail) map being
constructed from a parent (head, tail) map with (inclusive,
exclusive) bound.
These tests ensure that any future changes in Android's behavior
in this regard will not be accidental and that a potential
failure can be analysed efficiently.
Since the exact value of the bound doesn't matter, the test
here always uses an (inclusive or exclusive) bound of 0 with
a TreeMap<Integer, Void>.
Test: cts-tradefed run cts -c libcore.java.util.TreeMapTest
Change-Id: Iadebbb44342929820c242d922b8561f05ddb5fb8
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions