RFR(JDK 12/NIO) 8202285: (fs) Add a method to Files for comparing file contents

Joe Wang huizhe.wang at oracle.com
Tue Nov 6 20:51:42 UTC 2018


On 11/6/18, 8:55 AM, Roger Riggs wrote:
> +1
>
> Though with 65 tests, I suspect that there are more cases than 
> strictly needed
> to cover all the code flows.
> For example, three cases for testing when it is the same file doesn't 
> seem necessary.

Removed one of the three cases, leaving one edge case (non-existent) and 
one normal.

Removed all but two that verifies the edge case where one of the file 
sizes is zero, see line 173 and 174.

Removed most of the large files (1MB). The redundancy is not strictly 
necessary, the ones with 64kb are sufficient for verifying matching 
after a few iterations.

All together, that reduced the tests from 65 to 46.

http://cr.openjdk.java.net/~joehw/jdk12/8202285/webrev_v07/

Thanks,
Joe
>
> Regards, Roger
>
> On 11/05/2018 11:27 PM, Stuart Marks wrote:
>> On 10/19/18 11:26 AM, Joe Wang wrote:
>>> Current version:
>>> http://cr.openjdk.java.net/~joehw/jdk12/8202285/webrev_v06/
>>
>> Hi Joe,
>>
>> Thanks for updating the tests per my comments. Everything looks good 
>> now!
>>
>> s'marks
>


More information about the core-libs-dev mailing list