Re: NUnit 2.5: What's In It Now
"Charlie Poole" <[email protected]> Thu, 10 Apr 2008 16:21:10 -0700
| Newsgroups | gmane.comp.windows.dotnet.nunit.devel |
|---|---|
| Message-ID | <003201c89b61$921b6120$6401a8c0@ferrari> |
Hi Gary, I've been reading up a little bit on continuations (read this post: http://blogs.msdn.com/wesdyer/archive/2007/12/22/continuation-passing-style. aspx) It's cool stuff, but I'm not sure it helps us since it would require the user - at least as I understand it - to use the funky syntax rather than hiding it from him. I'm still trying to make sense of this, I don't know whether F# would let us do more funky stuff like this? As an aside - with theories, do we want our assumptions to return us immediately from the function (i.e. filtering), or flag that the theory code is expected to fail and then actually execute the code to check that it fails (i.e. validate the assumption). I don't think failing an assumption implies that the test would fail if run. It could just be outside the scope of the theory. > I have given up on that request completely. I see your point now that > I understand the framework and context better. You are right. I don't > necessarily want Assume to work for Test anymore, or even > IterativeTest. I would like it for Theory still, and will work with > Gary to see that it gets into his extension. > I like the Assume.That() syntax, but implementing it using exceptions will reduce the functionality currently in my extension. Maybe I could use a ThreadStatic flag? How would that work? That is, who would set it and who would honor it? > > > The proximity of the Assumes to the Asserts seems fundamental > > > to me in terms of expressiveness. Does that make sense to you > > > in the context of Theory? > > > > I like that aspect of David's implementation and it was my > > first choice of how to go. But I won't jump from that to > > the notion that no other way of doing it is possible, or > > maybe even better. Gary has implemented a different approach, > > for example. I want to write a non-trivial program using his > > implementation. Then I want to write my own. Then I feel like > > I'll be qualified to have a preference. > > Ok, that works for me. > I think one of the weaknesses of my approach is that the Assumes aren't inline with the code, but if we want to also think of theory explorers, we may want to "advertise" our assumptions in a different way, so that the tools can build up the datasets more intelligently? Interesting idea. > > Probably. But it's not the main point IMO. As a user, I > > don't throw an exception. I just Assume something. You're > > saying "As a user, I want to be able to make an assumption > > and have it verified. If it succeeds, the test continues. > > If it fails, the test terminates and succeeds." This > > doesn't make a lot of sense. > > Why not? That's what Assume means in all the literature. The only > variant is that if the test terminates in ALL cases of testing the > Theory, then it is not a success. > On my blog posts, I was saying that we would want to verify assumes (see my paragraph/reply a bit above to see what I mean). This isn't mentioned in the literature (that I can remember), and I'm not sure how useful this is in real life, but the idea of my extension was to keep all options open (well, put more functionality like this in, which could be removed later if it doesn't prove to be useful, rather than limit the functionality too soon - that's why I called it a prototype theory implementation). That's the diff between an experiment and a release - or so I've learned - if you put functionality into a release, you're pretty much stuck with it. :-) Charlie Cheers, Gary _____ Have you played Fishticuffs? Get fish-slapping on Messenger <http://www.fishticuffs.co.uk> ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ nunit-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nunit-developer