[threeten-dev] Please help to review new test code for java.time.Instant

Patrick Zhang patrick.zhang at oracle.com
Mon Jan 14 18:15:07 PST 2013


It has not been committed.

Hi Sherman,
Could you help to push it? webrev is below:

https://dl.dropbox.com/u/5812451/ppz/webrev/index.html

Regards
Patrick




On 1/14/13 6:28 PM, Stephen Colebourne wrote:
> Looks good to me.
> Are you committing this directly? Or via Sherman/Roger?
> Stephen
>
>
> On 14 January 2013 08:57, Patrick Zhang<patrick.zhang at oracle.com>  wrote:
>> Hi Stephen,
>>
>> It has been updated as below:
>> https://dl.dropbox.com/u/5812451/ppz/webrev/index.html
>>
>> Test result:
>> https://dl.dropbox.com/u/5812451/ppz/result/TCKInstant.jtr
>>
>> Regards
>> Patrick
>>
>>
>> On 1/11/13 7:11 PM, Stephen Colebourne wrote:
>>> The tests themselves are fine, however, they should be grouped in
>>> source code as a set of three after the minus_Duration() tests.
>>>
>>> The method names should also be changed to include "long";
>>> "minus_TemporalUnit" ->   "minus_longTemporalUnit"
>>>
>>> The same additional three tests should be added for plus.
>>>
>>> thanks
>>> Stephen
>>>
>>>
>>> On 11 January 2013 08:27, Patrick Zhang<patrick.zhang at oracle.com>   wrote:
>>>> Hi Team,
>>>>
>>>> Please help to review below new added test case:
>>>> http://cr.openjdk.java.net/~sherman/jdk8_threeten/patrick/instant/
>>>>
>>>> In current test code, Instant.minus(TemporalSubtractor substractor) has
>>>> been
>>>> included but Instant.minus(long amountToSubtract, TemporalUnit unit) is
>>>> missed.
>>>>
>>>> So below 3 methods are added to cover it:
>>>> ==================
>>>> minus_TemporalUnit()
>>>> minus_TemporalUnit_overflowTooSmall()
>>>> minus_TemporalUnit_overflowTooBig()
>>>> ==================
>>>>
>>>> Actually the logic is same with existing minus_Duration(),
>>>> minus_Duration_overflowTooSmall() and minus_Duration_overflowTooBig(). I
>>>> just use Instant.minus(long amountToSubtract, TemporalUnit unit) to
>>>> replace
>>>> Instant.minus(TemporalSubtractor substractor).
>>>>
>>>> Test result is here:
>>>>
>>>> http://sqeweb.us.oracle.com/jsn/users/patrick/newresult1/work/java/time/tck/java/time/TCKInstant.jtr
>>>>
>>>> Regards
>>>> Patrick
>>>>


More information about the threeten-dev mailing list