Hack to name unit tests?
Jari-Matti Mäkelä
jmjmak at utu.fi.invalid
Thu Nov 29 08:17:50 PST 2007
On Wed, 28 Nov 2007, Robert Fraser wrote:
> Dan wrote:
>> I'd then like to be able to specifically execute only specific unit test(s)
>> so that for instance I can debug the relationship between my x and y
>> modules without triggering off a test of the whole freakin' alphabet.
>>
>
> Besides the naming, all that is possible right now, which is what my tool is
> doing.
>
>> I would then like an improvement of unittests so that one can do more than
>> merely assert(). Complete self-examination code should be possible - which
>> means being able to examine program flow and trace variables. This would
>> ultimately lead to *being able to* generate proofs on the correctness of
>> the code.
>>
>> Someone could then just write a library.
>
> Hmmm... that sounds a bit complex for an average tester. Might be a good idea
> in a pure-functional language, but I can't see it being much use in D.
Yep, it's a bit difficult to prove the correctness with unittests because
of side effects. Also 100% test coverage won't mean it works perfectly.
Hmm, what about unittest as an attribute / annotation for functions. This
works pretty well in Java and is more flexible than the one in D.
More information about the Digitalmars-d
mailing list