Paul Johnson wrote: > One question though. Why > > subtest "text", sub {}; > > rather than > > subtest {}, "text"; > > ? > > The latter seems more consistent as well as removing a rather annoying bit of > syntax. Were you worried that "text" might get lost at the end of the sub?
Not so much lost as the purpose of "text" is to describe what the big block of test code is going to do. Putting it last defeats that purpose. { ...some code... } # This is what that code above did. Also you got the syntax wrong, which illustrates the other reason. David Wheeler wrote: > Even better, get rid of the two arguments: > > subtest { > name 'text'; > pass; > }; That's interesting, though I don't think its worthwhile as the name is serving a dual purpose as mentioned above. It's not just the name of the subtest but also explaining what the subtest block is doing to the person reading the code. It serves that purpose better at the front. -- 39. Not allowed to ask for the day off due to religious purposes, on the basis that the world is going to end, more than once. -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army http://skippyslist.com/list/