Parameterized unit testing and benchmarking of phobos
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Thu Oct 9 10:36:54 PDT 2014
On 10/9/14, 9:57 AM, Robert burner Schadek wrote:
> On Thursday, 9 October 2014 at 16:36:35 UTC, Johannes Pfau wrote:>
>> +1, std.benchmark should be revived.
>
>
> -1, This really does not solve my problem. I need a parameterized unit
> test facility aka. Haskell QuickCheck with the additional benchmarking
> feature that allows me/us to track performance over time aka. benchmark
> result dump to file in csv style manner.
version (xyz) unittest
{
...
}
is a good idiom. I noticed you feel strongly about bracing but I
unrecommend it (and we should disallow it for phobos) as it forces you
to either double-indent everything (net loss) or create an exception
with regard to indentation. Also the opening extra brace has a "garden
path sentence" liability, it suggests more stuff will be encompassed by
the brace but then only at the closing brace there's the realization
there's only encompassed entity.
The idiom is already used, see e.g.
https://github.com/D-Programming-Language/phobos/blob/master/std/file.d#L322.
Andrei
More information about the Digitalmars-d
mailing list