Re: enabling java assertions in the tests

2007-05-31 Thread Doron Cohen
Paul Elschot <[EMAIL PROTECTED]> wrote on 31/05/2007 16:21:09: > > Adding: > > > > > > > > > > to the task would enable assertions during tests > > regardless of ANT_OPTS variable (and hopefully on all OSs). > My common-build.xml has this added in the junit task: > >

Re: enabling java assertions in the tests

2007-05-31 Thread Doron Cohen
DM Smith wrote on 31/05/2007 15:59:05: > I think that having assertions is of no value if they are never > turned on :) > > I suggest going carefully in adding assertions. There are a lot of > places where assertions are inappropriate (e.g. checking parameters > on a public method). > > I think Su

Re: enabling java assertions in the tests

2007-05-31 Thread Paul Elschot
On Friday 01 June 2007 00:30, Doron Cohen wrote: > > While testing LUCENE-866 I realized that Java assertions > are disabled when *I* run 'ant test'. > Others did have the assertion executed and causing that > NPE. So I am not sure if this is general problem or only > a Windows one. Indeed, see b

Re: enabling java assertions in the tests

2007-05-31 Thread DM Smith
I think that having assertions is of no value if they are never turned on :) I suggest going carefully in adding assertions. There are a lot of places where assertions are inappropriate (e.g. checking parameters on a public method). I think Sun's document gives good guidelines: http://ja

Re: enabling java assertions in the tests

2007-05-31 Thread Michael McCandless
"Doron Cohen" <[EMAIL PROTECTED]> wrote: > > While testing LUCENE-866 I realized that Java assertions > are disabled when *I* run 'ant test'. I noticed this too; in my patch on LUCENE-843 I've turned on assertions for all unit tests (I'm using alot of asserts in that patch) as well. > Others did

enabling java assertions in the tests

2007-05-31 Thread Doron Cohen
While testing LUCENE-866 I realized that Java assertions are disabled when *I* run 'ant test'. Others did have the assertion executed and causing that NPE. So I am not sure if this is general problem or only a Windows one. Compile wise we are ok, having "-source 1.4". At runtime, assertions can