From: Massimiliano Mirra Date: 2002-10-12T01:41:34+09:00 Subject: Re: Another take on ensuring right args to methods On Thu, Oct 10, 2002 at 02:45:12AM +0900, Mauricio Fern�ndez wrote: > > > the object represents /dev/null and you cannot read back what you > > > wrote previously? > > If the method needs to read back, you've just caught a bug; if it does > > not need to read back, you're running the wrong test. > > > > > It is hard to specify the right minimal semantic requirements... > > > > Anything in particular makes you think so? > > I only needed about .1s to find the /dev/null example. Now if only it showed something... > There must be > tons of them. If you completely specify the semantics of something, it > is too constrained, for somebody could find another use for it you > didn't think of. Then don't specify it completely. > > > IMHO it is a good idea if some provision is made for "non-standard" > > > behaving objects. > > > > I wasn't suggesting standard tests -- that would be equivalent to > > going back to type names; I was suggesting ad-hoc tests made up > > according to the needs of the method. > > We'd need a summary of "best current practice" for this kind of tests so > you don't make too many assumptions. We'd need a summary of "best current practice" for lots of things we do daily. :-) Massimiliano