harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Magnusson Jr <g...@pobox.com>
Subject Re: Java 5 String APIs (code points, StringBuilder, etc) RE: [classlib] String is special
Date Mon, 24 Apr 2006 21:21:11 GMT
Or just put the test in java.lang as an implementation test.

We should resolve this.  Among others, we're going to have spec tests, 
which Tim and others rightly point out that we need to be careful with 
and keep out of the boot classpath to ensure that tests happen in the 
context of userland.

However, with a good understanding of the limits, we should be also able 
to have the 'easy to use' same-package tests for implementation.

In that vein, we could also create a helper framework that lets us write 
tests in java.lang (for example) and it transforms into the helper Tim 
suggests automatically...

geir


Tim Ellison wrote:
> I suggest you write a helper method to create a String with that
> constructor using reflection (setAccessible(true)).
> 
> Regards,
> Tim
> 
> Nathan Beyer wrote:
>> Since I probably share some responsibility in the "String is special" topic
>> being brought up, I wanted to try out the "golden ticket" bit for some
>> further enhancements.
>>
>> I've made some changes to String to add the new Java 5 APIs related to code
>> points, StringBuilder, etc.
>>
>> I've posted a proposed patch on this issue [1]. I'd already opened this bug.
>> The patch contains updates to String and StringTest.
>>
>> There is one concern that I have about the code and the test (and all String
>> tests we have in general). There's the possibility of a String being
>> constructed with a non-zero offset; there's a package-private constructor
>> String(int start, int len, char[] data). I haven't found any other way to
>> setup this variant and I'd like to test all of the methods when the offset
>> is greater than 0, but this requires the test case to be in the "java.lang"
>> package. I know this has been an issue that been discussed on and off, but
>> didn't think any concrete solution had been arrived at for doing this and I
>> haven't seen any test cases in the java package spaces.
>>
>> Please let me know if there are any questions or if any more information is
>> needed. Thanks.
>>
>> -Nathan
>>
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>
>>
> 


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message