Thread: [Junitdoclet-users] Re: JUnit 3.8.1
Brought to you by:
sgemkow
From: <ste...@ob...> - 2002-12-10 22:10:33
|
Matt asked a question, I'd like to answer: > Are the any plans to support Junit 3.8.1 style syntax soon? Well, it does already. What do you mean? I assume (this is just guessing) you have trouble with some accessor test for a double (or float) value. The third parameter of assertEquals(double expected, double actual, double delta) (the delta) is not there. Right? This is not a bug, it's a feature. Let me explain: What delta would fit every need? (We would like to use it. ;-)) Why did Kent and Erich came up with that third parameter anyway? -> Because only YOU know, what is appropriate. Don't trust a tool that is thinking for you. JUnitDoclet does not think, so you don't need to outsmart it. JUnitDoclet is behaving in a predictable way, so whenever you should decide, the compiler will point you to the place begging for your decision. Because that is in between markers, JUnitDoclet does remember your decision, it won't ask for the same thing twice. Again, this answer is just based on a wild guess. Matt, if this is not your problem, please be more specific about the syntax of JUnit 3.8.1 you want to use. BTW: Thanks for pointing me to the error in the FAQ regarding "-source 1.4" vs. "-source=1.4". I've fixed it. Regards, Steffen Gemkow -- ObjectFab GmbH ste...@ob... |
From: Matt R. <ma...@ra...> - 2002-12-10 22:22:54
|
I have no specific reason for wanting 3.8.1 - I just saw a message yesterday (can't seem to find it now) that some syntax had changed in 3.8.1 and tests were easier to write now. Just wondering so I could answer this question if it ever does come up. I'm writing a sample app that demonstrates using Xdoclet, Struts, JUnitDoclet, Cactus and other tools to build a webapp and test it. Matt > -----Original Message----- > From: jun...@li... > [mailto:jun...@li...] On > Behalf Of ste...@ob... > Sent: Tuesday, December 10, 2002 3:13 PM > To: jun...@li... > Subject: [Junitdoclet-users] Re: JUnit 3.8.1 > > > Matt asked a question, I'd like to answer: > > > Are the any plans to support Junit 3.8.1 style syntax soon? > Well, it does already. What do you mean? > > I assume (this is just guessing) you have trouble with some > accessor test for a double (or float) value. The third > parameter of assertEquals(double expected, double actual, > double delta) > (the delta) is not there. Right? > > This is not a bug, it's a feature. Let me explain: > > What delta would fit every need? (We would like to use it. > ;-)) Why did Kent and Erich came up with that third parameter anyway? > > -> Because only YOU know, what is appropriate. > > Don't trust a tool that is thinking for you. JUnitDoclet does > not think, so you don't need to outsmart it. JUnitDoclet is > behaving in a predictable way, so whenever you should decide, the > compiler will point you to the place begging for your > decision. Because that is in between markers, JUnitDoclet > does remember > your decision, it won't ask for the same thing twice. > > Again, this answer is just based on a wild guess. > Matt, if this is not your problem, please be more specific > about the syntax of JUnit 3.8.1 you want to use. > > BTW: Thanks for pointing me to the error in the FAQ regarding > "-source 1.4" vs. "-source=1.4". I've fixed it. > > Regards, > > Steffen Gemkow > -- > ObjectFab GmbH > ste...@ob... > > > > ------------------------------------------------------- > This sf.net email is sponsored by: > With Great Power, Comes Great Responsibility > Learn to use your power at OSDN's High Performance Computing > Channel http://hpc.devchannel.org/ > _______________________________________________ > Junitdoclet-users mailing list Jun...@li... > https://lists.sourceforge.net/lists/listinfo/junitdoclet-users > |
From: <ste...@ob...> - 2002-12-12 10:21:28
|
On 10 Dec 2002 at 15:22, Matt Raible wrote: > I have no specific reason for wanting 3.8.1 - I just saw a message > yesterday (can't seem to find it now) that some syntax had changed in > 3.8.1 and tests were easier to write now. Just wondering so I could > answer this question if it ever does come up. I'm writing a sample app > that demonstrates using Xdoclet, Struts, JUnitDoclet, Cactus and other > tools to build a webapp and test it. I guess you are refering to the standard constructor. Since JUnit 3.8.1 you don't need to pass a name to the constructor. Java allows a class without explicit declared constructor if the superclass has a constructor without parameters. So you could skip writing a constructor in a TestCase _if_you_are_ _using_JUnit_3.8.1_only_. Please see JUnit docs for details. But the "old fashioned" constructors are working fine too. JUnitDoclet does generate constructors in that way, so TestCases can be used with JUnit versions prior to 3.8.1. I believe 3.7 is used quite often. Regards, Steffen Gemkow -- ObjectFab GmbH ste...@ob... |