Re: Is it a bug in unittest ?

2016-09-02 Thread ZombineDev via Digitalmars-d
On Thursday, 1 September 2016 at 18:11:55 UTC, angel wrote: If one creates a unittest block in a templated class (or struct), the unittest block will be multiplied per class specialization, which might turn out to be quite large number. E.g. struct A(T) { ... unittest {

Re: Is it a bug in unittest ?

2016-09-01 Thread H. S. Teoh via Digitalmars-d
On Thu, Sep 01, 2016 at 06:11:55PM +, angel via Digitalmars-d wrote: > If one creates a unittest block in a templated class (or struct), the > unittest block will be multiplied per class specialization, which > might turn out to be quite large number. > > E.g. > struct A(T) { > ... >

Re: Is it a bug in unittest ?

2016-09-01 Thread Lodovico Giaretta via Digitalmars-d
On Thursday, 1 September 2016 at 18:11:55 UTC, angel wrote: If one creates a unittest block in a templated class (or struct), the unittest block will be multiplied per class specialization, which might turn out to be quite large number. E.g. struct A(T) { ... unittest {

Is it a bug in unittest ?

2016-09-01 Thread angel via Digitalmars-d
If one creates a unittest block in a templated class (or struct), the unittest block will be multiplied per class specialization, which might turn out to be quite large number. E.g. struct A(T) { ... unittest { ... } } ... auto a = A!int; auto b = A!int; auto c

There is a bug for '-unittest'?

2014-08-26 Thread FrankLike via Digitalmars-d-learn
Hello,every one: There is a unit test for a.d,it will be pass,do you think it's right? or it's my error? /// the file name is a.d class Math { /// add function static int add(int x, int y) { return x + y; } /// unittest { // assert(add(2, 2) == 5);

Re: There is a bug for '-unittest'?

2014-08-26 Thread ketmar via Digitalmars-d-learn
On Tue, 26 Aug 2014 13:38:17 + FrankLike via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: dmd -unittest a.d so? you compiled the code. but you need to run the resulting .exe to invoke unittests. or just use 'rdmd' instead. signature.asc Description: PGP signature

Re: There is a bug for '-unittest'?

2014-08-26 Thread FrankLike via Digitalmars-d-learn
On Tuesday, 26 August 2014 at 13:49:39 UTC, ketmar via Digitalmars-d-learn wrote: On Tue, 26 Aug 2014 13:38:17 + FrankLike via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: dmd -unittest a.d so? you compiled the code. but you need to run the resulting .exe to invoke