Re: Bug(?) in Theories with non-static @DataPoint method
David Saff <[email protected]> Wed, 28 Jul 2010 11:02:27 -0400
| Newsgroups | gmane.comp.java.junit.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jul 28, 2010 at 10:13 AM, Johannes Schneider <[email protected]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 07/23/2010 09:53 PM, David Saff wrote: >> Johannes, >> >> Sorry to be so long in getting back to you. > > No problem. But can you tell me where the devs are discussing? The junit-devel list (cc'ed) is the best location for e-mail discussion. Most discussion between Kent and I is by voice, however. > I have some ideas I'd like to share with them. > >> Have you opened a bug on github? > > will do that. > > > Johannes > >> >> =A0 =A0David Saff >> >> On Sat, Jul 10, 2010 at 7:31 AM, Johannes Schneider >> <[email protected]> wrote: >> Hi guys, >> >> don't know where to post, so hopefully this list is the right one. >> >> I run into some problems related to Theories and DataPoints (with 4.8.1): >> >> >> This test is marked as successfull but did *not* run: >> >> @RunWith( Theories.class ) >> public class TheoriesTest { >> =A0@Theory >> =A0public void aTheory( String arg ) { >> =A0 =A0System.out.println( "TheoriesTest.aTheory(" + arg + ")" ); >> =A0 =A0assertNotNull( arg ); >> =A0} >> >> =A0@DataPoint >> =A0public String getParam() { >> =A0 =A0return "daParam"; >> =A0} >> } >> >> >> I think the problem lies in Theories:126. >> statement.evaluate() catches exceptions silently >> (org.junit.experimental.theories.Theories.TheoryAnchor#methodCompletesWi= thParameters:158). >> >> Therefore "handleDataPointSuccess" is called even when an exception has >> been thrown.... >> >> >> >> So I think there are at least two things missing: >> - Proper exception handling... >> - Checking the DataPoint(s) methods for the static keyword >> >> >> By the way: Why isn't it allowed to return Iterables or at least Lists >> in @DataPoints methods? >> >> >> >> Thanks, >> >> Johannes >> >>> > - > -------------------------------------------------------------------------= ----- > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Junit-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/junit-devel >>> > > - -- > Johannes Schneider - blog.cedarsoft.com > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > > iQEcBAEBAgAGBQJMUDsgAAoJEAytD9R7Qv6dZH8IAIgyiRFm6Hx5AjTGuQWsv7xO > H3j3OJiHRXrb610pDlUpVj8iwlRspB0sR0PUEalxWeePpEZ7JPva/1j2JH8jnNHX > +1VMNqsWFxCRvistvQvV/jLTKmWFSxOTXdgP4Q1lm6baXQPP6Dr342bEuDpWYnZp > VacxMVRqScrCxyVt5yOSW0rkKxGmHOxjRrC8QeYAQJlVO+3BzmbbqqsL1C4QCCX9 > TROc9Ga1zAJlpSThqJd1PBBMVcDGTsNVECebrC9bGTWLzYRLxC6N9BkoFUaxkceG > Q7G7h/cvn+QlV3VbmiY7hMGNul3oc3wjZ35e/TXDZcaA5+15HdKpby4zRkjFzME=3D > =3D8I6j > -----END PGP SIGNATURE----- > ---------------------------------------------------------------------------= --- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm