harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject [classlib] exception messages (was: Re: svn commit: r400008 - in /incubator/harmony/enhanced/classlib/trunk/modules/text/src: main/java/java/text/ test/java/org/apache/harmony/text/tests/java/text/)
Date Fri, 12 May 2006 09:19:29 GMT
(sorry for the late response)

Mikhail Loenko wrote:
> For both items we had discussions that did not complete to decisions:
> 
> About exception messages Geir was going to contact Sun.

I believe the issue was not whether we can copy Sun's exception messages
 but the problem of a test case asserting the value of a particular
exception message that may/will be NLSed.

Tests shouldn't assert the actual message String in an exception.

Regards,
Tim


> About whether it is acceptable to throw a subclass we did not reach
> an agreement. Once we reach any agreement it would be easy to convert
> all the tests this or that way.
> 
> Thanks,
> Mikhail
> 
> 
> 2006/5/5, Mark Hindess <mark.hindess@googlemail.com>:
>>
>> On 5 May 2006 at 11:33, Tim Ellison <t.p.ellison@gmail.com> wrote:
>> >
>> > mloenko@apache.org wrote:
>> > <snip>
>> >
>> > > Modified:
>> incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/j
>> > ava/org/apache/harmony/text/tests/java/text/BidiTest.java
>> > > URL:
>> http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trun
>> >
>> k/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/BidiTest
>>
>> > .java?rev=400008&r1=400007&r2=400008&view=diff
>> > >
>> ===========================================================================
>>
>> > ===
>> > > ---
>> incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/or
>> > g/apache/harmony/text/tests/java/text/BidiTest.java (original)
>> > > +++
>> incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/or
>> > g/apache/harmony/text/tests/java/text/BidiTest.java Fri May  5
>> 00:55:46 2006
>> > > @@ -15,10 +15,8 @@
>> > >
>> > >  package org.apache.harmony.text.tests.java.text;
>> > >
>> > > -import java.text.AttributedString;
>> > >  import java.text.Bidi;
>> > >  import java.util.Arrays;
>> > > -import java.util.List;
>> > >
>> > >  import junit.framework.TestCase;
>> > >
>> > > @@ -59,6 +57,13 @@
>> > >             } catch (IllegalArgumentException e) {
>> > >                     // expected
>> > >             }
>> > > +
>> > > +           try {
>> > > +            bd = new Bidi(null);
>> > > +            fail("should throw IAE");
>> > > +        } catch (IllegalArgumentException e) {
>> > > +            assertEquals("paragraph is null", e.getMessage());
>> >
>> > This assertion is bogus, the API spec doesn't require this text, and
>> > it will fail when we switch to Russian locale messages.
>>
>> I mentioned that this should be removed in my most recent JIRA comment
>> for this issue.
>>
>> > <snip>
>> >
>> > > +        } catch (ParseException e) {
>> > > +            assertEquals("java.text.ParseException",
>> e.getClass().getName(
>> > ));
>> >
>> > Huh?
>>
>> Oops!  Didn't spot that one.  Who wrote that rubbish?  ;-)
>>
>> -Mark.
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

---------------------------------------------------------------------
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