'live' testing style
spir
denis.spir at gmail.com
Tue Feb 15 04:07:02 PST 2011
On 02/15/2011 10:00 AM, Lars T. Kyllingstad wrote:
> On Sun, 13 Feb 2011 23:03:06 +0100, spir wrote:
>
>> 1. Named unittests allowing test suites in the form of (just an
>> example):
>>
>> unittest test1 {
>> ...
>> }
>> unittest test2 {
>> ...
>> }
>> unittest test3 {
>> ...
>> }
>> unittest {
>> test1;
>> test2;
>> test3;
>> }
>>
>> /Unnamed/ unittests are run with --unittest. Named ones are intended to
>> be called from unnamed ones. Backward compatible change.
>
> Works now:
>
> version(unittest) void test1() { ... }
> version(unittest) void test2() { ... }
> version(unittest) void test3() { ... }
>
> unittest
> {
> test1();
> test2();
> test3();
> }
Agreed, that's about what I do. The whole point is to have it as a standard
feature of the language. You don't need the current 'unittest' feature to write
unittests, do you? I doesn't even solve typing (or so few?). But as stated by
Walter, having it as a builtin feature makes the difference in D code beeing
commonly unit-tested.
denis
--
_________________
vita es estrany
spir.wikidot.com
More information about the Digitalmars-d
mailing list