Re: should strings in exceptions match the reference implementation?

2006-04-16 Thread Anton Avtamonov
On 4/17/06, Mikhail Loenko <[EMAIL PROTECTED]> wrote: > Why it is that complicated? > > Why one have jump over utility methods in different classes or even folders to > understand what a 5-line test does? > > testSomething() throw OtherException { >try { >ec.do_something_excep

Re: should strings in exceptions match the reference implementation?

2006-04-16 Thread Anton Avtamonov
On 4/17/06, Andrew Zhang <[EMAIL PROTECTED]> wrote: > Very sorry, there're some typing mistakes in last letter. Please ignore it. Exctually, I haven't noticed any :-). May be because I also do lots of them. I hope native-speakers will excuse us :-). Wishes, -- Anton Avtamonov, Intel Middleware Pr

Re: should strings in exceptions match the reference implementation?

2006-04-16 Thread Anton Avtamonov
On 4/17/06, Andrew Zhang <[EMAIL PROTECTED]> wrote: > Hello, Anton, > > On 4/17/06, Anton Avtamonov <[EMAIL PROTECTED]> wrote: > > > > No, we don't need all those branches. Only the branch for Harmony. > > Only for those cases when we DO know that we have a deviation. > > IMHO, I prefer to have all

Re: should strings in exceptions match the reference implementation?

2006-04-16 Thread Andrew Zhang
Very sorry, there're some typing mistakes in last letter. Please ignore it. Hello, Anton, On 4/17/06, Andrew Zhang <[EMAIL PROTECTED]> wrote: > > > > On 4/17/06, Anton Avtamonov <[EMAIL PROTECTED]> wrote: > > > > No, we don't need all those branches. Only the branch for Harmony. > > Only for tho

Re: should strings in exceptions match the reference implementation?

2006-04-16 Thread Anton Avtamonov
On 4/17/06, Mikhail Loenko <[EMAIL PROTECTED]> wrote: > Sorry, Anton, I did not catch. > > Only one branch means "no branches, just one way" or does it mean > "two different ways (one normal way and one branch)"? > > If we have just one way, why isHarmony() method necessary? Mikhail, Formally two

Re: should strings in exceptions match the reference implementation?

2006-04-16 Thread Andrew Zhang
Hello, Anton, On 4/17/06, Anton Avtamonov <[EMAIL PROTECTED]> wrote: > > No, we don't need all those branches. Only the branch for Harmony. > Only for those cases when we DO know that we have a deviation. > IMHO, I prefer to have all tests passing on RI (which verify tests > itself) and on Harmony

Re: should strings in exceptions match the reference implementation?

2006-04-16 Thread Mikhail Loenko
Sorry, Anton, I did not catch. Only one branch means "no branches, just one way" or does it mean "two different ways (one normal way and one branch)"? If we have just one way, why isHarmony() method necessary? Thanks, Mikhail 2006/4/17, Anton Avtamonov <[EMAIL PROTECTED]>: > On 4/17/06, Mikhail

Re: should strings in exceptions match the reference implementation?

2006-04-16 Thread Mikhail Loenko
2006/4/17, Anton Avtamonov <[EMAIL PROTECTED]>: > In addition, I want to share what I do when testing exceptions. > > I created the following basic abstract class: > >protected abstract class ExceptionalCase { >private Class clazz; >private String msg; > >public abstract

Re: should strings in exceptions match the reference implementation?

2006-04-16 Thread Anton Avtamonov
On 4/17/06, Mikhail Loenko <[EMAIL PROTECTED]> wrote: > Why we should test something other than Harmony? > > We might run our tests on different implemetations to > see whether/how they differ from Harmony, but we do not need > special branches in our tests like > > if( isHarmony() ) { > assert(ha

Re: should strings in exceptions match the reference implementation?

2006-04-16 Thread Anton Avtamonov
In addition, I want to share what I do when testing exceptions. I created the following basic abstract class: protected abstract class ExceptionalCase { private Class clazz; private String msg; public abstract void exceptionalAction() throws Exception; public

Re: should strings in exceptions match the reference implementation?

2006-04-16 Thread Mikhail Loenko
Why we should test something other than Harmony? We might run our tests on different implemetations to see whether/how they differ from Harmony, but we do not need special branches in our tests like if( isHarmony() ) { assert(harmony behavior) } else if( is BEA ) { assert(BEA behav) { } else

Re: should strings in exceptions match the reference implementation?

2006-04-16 Thread Mikhail Loenko
I think we may have this kind of tests. It is not a problem if we do not pass on other implementations - we will have a number of test types and some of them will stick to our implementation. it is OK. So if the message in exception is important (e.g. IMHO text for an NPE message in a one-argument

Re: should strings in exceptions match the reference implementation?

2006-04-16 Thread Anton Avtamonov
On 4/17/06, Mark Hindess <[EMAIL PROTECTED]> wrote: > So, the second issue, should we be checking for messages/descriptions > in exception > tests, even to match what Harmony throws? If we do then our api tests > wont pass on other implementations. Hi Mark, As I said already I don't see any huge

Re: another unstable test?

2006-04-16 Thread Mark Hindess
Thanks Paulex. I wasn't able to consistently reproducing the problem so testing is a little tricky but I will take a look at the fixes when JIRA is revived. Regards, Mark. On 4/17/06, Paulex Yang <[EMAIL PROTECTED]> wrote: > LvJimmy,Jing wrote: > > This is the one Stepan found somedays before?

Re: should strings in exceptions match the reference implementation?

2006-04-16 Thread Mark Hindess
Ok. I think it's a little unfortunate for our users that we can't match error messages but you are probably correct about them being copyright. So, the second issue, should we be checking for messages/descriptions in exception tests, even to match what Harmony throws? If we do then our api tests

Re: should strings in exceptions match the reference implementation?

2006-04-16 Thread Anton Avtamonov
On 4/17/06, LvJimmy,Jing <[EMAIL PROTECTED]> wrote: > Agreed. Try some other words may be better. The only possible un-compatible > with RI is that some rookie may write codes like: > try{ >... > }catch(Except e){ >if (e.getMessage().equals(RI_String)){ >dosomething; >} > } > Bu

Re: assertEquals in tests with incorrect argument order

2006-04-16 Thread Anton Avtamonov
Completely agree about using proper 'asserts' :-). Just want to remind about one more useful pair of methods - assertSame()/assertNotSame() which are useful when comparing instances. I saw many times in my practice that assertTrue(instance1 == instance2) was used intead. Besides, assertEquals() is

Re: quicker builds with more recent versions of ant

2006-04-16 Thread Paulex Yang
Matt Benson wrote: --- Mark Hindess <[EMAIL PROTECTED]> wrote: Just in case this helps anyone else. I noticed something odd this morning. Although the default excludes in ant 1.6.2 correctly ignore .svn directories it doesn't seem to do so very efficiently. For example, doing: ant -f mak

Re: another unstable test?

2006-04-16 Thread Paulex Yang
LvJimmy,Jing wrote: This is the one Stepan found somedays before? Perhaps Paulex has fixed it. Yes, I've raised Harmony-339 to improve several unstable tests and I think this test has been included, but currently the patch is waiting for approval. Mark, you can try to apply it locally to s

Re: [jira] Commented: (HARMONY-88) Contribution of code and unit tests for jndi, logging, prefs and sql plus unit tests only for beans, crypto, math, regex and security

2006-04-16 Thread Richard Liang
Mikhail Loenko wrote: Hi Richard Do you know, why these beans tests contain package 'sun.beans'? What kind of classes are there? Thanks, Mikhail 2006/4/17, Richard Liang <[EMAIL PROTECTED]>: Mikhail Loenko (JIRA) wrote: [ http://issues.apache.org/jira/browse/HARMONY-88?page=comm

Re: Long,long testcase name...

2006-04-16 Thread LvJimmy,Jing
2006/4/16, LvJimmy,Jing <[EMAIL PROTECTED]>: > > > > 2006/4/15, Geir Magnusson Jr <[EMAIL PROTECTED]>: > > > > > > > Jimmy, Jing Lv wrote: > > > > > One day, with Harmony spreading all over the world, I don't want to > > > hear anyone saying: "Woo, who's that guy writing these tests named > > > 't

Harmony JIRA system is unavailable

2006-04-16 Thread Richard Liang
As subject. :-( -- Richard Liang China Software Development Lab, IBM - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

Re: [jira] Commented: (HARMONY-88) Contribution of code and unit tests for jndi, logging, prefs and sql plus unit tests only for beans, crypto, math, regex and security

2006-04-16 Thread Mikhail Loenko
Hi Richard Do you know, why these beans tests contain package 'sun.beans'? What kind of classes are there? Thanks, Mikhail 2006/4/17, Richard Liang <[EMAIL PROTECTED]>: > Mikhail Loenko (JIRA) wrote: > > [ > > http://issues.apache.org/jira/browse/HARMONY-88?page=comments#action_12373811 > >

Re: assertEquals in tests with incorrect argument order

2006-04-16 Thread LvJimmy,Jing
2006/4/17, Mark Hindess <[EMAIL PROTECTED]>: > > Another type of test that could be improved are those using > assertTrue to compare two objects for equality. Most of them should > be using assertEquals, assertNull or assertNotNull. > > Using assertEquals automatically gives more meaningful error

Re: Long,long testcase name...

2006-04-16 Thread LvJimmy,Jing
2006/4/16, Nathan Beyer <[EMAIL PROTECTED]>: > > > > -Original Message- > > From: LvJimmy,Jing [mailto:[EMAIL PROTECTED] > > Sent: Saturday, April 15, 2006 9:45 PM > > To: harmony-dev@incubator.apache.org > > Subject: Re: Long,long testcase name... > > > > 2006/4/16, Nathan Beyer <[EMAIL PR

Re: [jira] Commented: (HARMONY-88) Contribution of code and unit tests for jndi, logging, prefs and sql plus unit tests only for beans, crypto, math, regex and security

2006-04-16 Thread Richard Liang
Mikhail Loenko (JIRA) wrote: [ http://issues.apache.org/jira/browse/HARMONY-88?page=comments#action_12373811 ] Mikhail Loenko commented on HARMONY-88: --- auth, crypto, and security parts integrated in revision 392891 Hello, Beans tests are not in

Re: should strings in exceptions match the reference implementation?

2006-04-16 Thread LvJimmy,Jing
2006/4/16, Mikhail Loenko <[EMAIL PROTECTED]>: > > Are those strings copyrighted? I mean we obviously cannot copy-paste > spec to the javadoc comments of our code, and we probably cannot > copy-paste RI's messages as well. Agreed. Try some other words may be better. The only possible un-compatibl

Re: assertEquals in tests with incorrect argument order

2006-04-16 Thread Richard Liang
Mark Hindess wrote: Another type of test that could be improved are those using assertTrue to compare two objects for equality. Most of them should be using assertEquals, assertNull or assertNotNull. Using assertEquals automatically gives more meaningful error messages. I strongly support th

Re: External libraries in the bootclasspath

2006-04-16 Thread Chris Gray
On Friday 14 April 2006 10:51, Paulex Yang wrote: > Soeren Strassfeld wrote: > > Ilya Neverov schrieb: > > > > Hi Ilya, > > > > just followed your link, as I understand it, the endorsed mechanism is > > only for API Classes, which > > are developed outside the JCP. This contains the org.w3c, org.xm

Re: assertEquals in tests with incorrect argument order

2006-04-16 Thread Mark Hindess
Another type of test that could be improved are those using assertTrue to compare two objects for equality. Most of them should be using assertEquals, assertNull or assertNotNull. Using assertEquals automatically gives more meaningful error messages. It saves people writing asserts like: asser

Re: ¿Pascuas en el siglo XXI?

2006-04-16 Thread Fernando Cassia
What the Is there a way to moderate harmont-dev so messages like this can never make it to the list?. Last thing I need is religious spam FC On 4/16/06, Edgardo Maidana Maidana <[EMAIL PROTECTED]> wrote: > > > VoSier El-hoím >

¿Pascuas en el siglo XXI?

2006-04-16 Thread Edgardo Maidana Maidana
¿Para qué queremos unas fiestas pascuales en el siglo XXI?¿Qué beneficio me puede traer un hombrecito que murió hace 2000 años?¿o mejor, puede esa muerte pagarme las cuentas, sanar mis heridas y golpes cotidianos, ayudarme con mi carrera, conseguir que yo obtenga lo deseado?¿Cuál es el sentir