RFR (S) 8136500: Integer/Long getChars and stringSize should be more idiomatic

Aleksey Shipilev aleksey.shipilev at oracle.com
Mon Nov 23 18:07:26 UTC 2015


On 11/23/2015 09:05 PM, Aleksey Shipilev wrote:
> On 11/23/2015 08:58 PM, John Rose wrote:
>> On Nov 23, 2015, at 8:23 AM, Ivan Gerasimov <ivan.gerasimov at oracle.com
>> <mailto:ivan.gerasimov at oracle.com>> wrote:
>>>
>>> Though, it may be better to get yet another pair of eyes.
>>>
>>> One minor nit: In the tests, in the summary, it is written, "Test
>>> Integer.toString method*s*", but only one of the overloads is tested.
>>
>> Here's another nit in the tests.
>> This is supposed to "wiggle around" critical points, which I agree with.
>> But it only wiggles above:
>>
>>   39         while (base < Long.MAX_VALUE / 10) {
>>   40             for (int c = 1; c < 65536; c++) {
>>   41                 buildAndTest(base + c);
>>   42             }
>>   43             base = (base == 0) ? 1 : base * 10;
>>   44         }
> 
> Yes, it *does* wiggle around:
> 
>   71         test(sbN.toString(), -c);
>   72         test(sbP.toString(), c);

Ah no, I understand now. Doing too much at the same time. Let me make
tests more testy.

Thanks,
-Aleksey





More information about the core-libs-dev mailing list