JDK 9 RFR of JDK-8023898: Consolidate Map tests Collisions and InPlaceOpsCollisions into general Map-based test

Amy Lu amy.lu at oracle.com
Mon Dec 12 02:07:07 UTC 2016


Yes :-)

Fixed for Collisions.testIntegerIteration and 
Collisions.testStringIteration:
http://cr.openjdk.java.net/~amlu/8023898/webrev.02/

Thanks,
Amy

On 12/10/16 1:01 AM, Paul Sandoz wrote:
> Hi Amy,
>
> A nice refactoring and clean up.
>
> For some test cases in Collisions you don’t need to obtain the array of keys, you just need to know the key length, which can be obtained from map.size().
>
> Paul.
>
>> On 8 Dec 2016, at 19:19, Amy Lu <amy.lu at oracle.com> wrote:
>>
>> Please review this test refactoring to map test Collisions and InPlaceOpsCollisions.
>>
>> These tests have (almost) same code for creating test data, and the test data can be reused cross tests. With converting to testng, test data creating is now done and provided by MapWithCollisionsProviders.java, and each test now uses explicit data provider, which makes test more clear.
>>
>> Other changes include:
>> * Removed the redundant test Collections.testContainsKey and unnecessary map size check in the beginning of each test.
>> * Replaced 'check' with testng assertion method.
>> * Renaming and reformatting to make it more clear.
>>
>> bug:https://bugs.openjdk.java.net/browse/JDK-8023898
>> webrev:http://cr.openjdk.java.net/~amlu/8023898/webrev.01/
>>
>> Thanks,
>> Amy



More information about the core-libs-dev mailing list