Re: Is it normal that unittests of phobos are executed with my project build?

2014-06-16 Thread Steven Schveighoffer via Digitalmars-d-learn
On Sat, 14 Jun 2014 10:32:04 -0400, Xavier Bigand  
flamaros.xav...@gmail.com wrote:


I get a failure on a test in format.d when I build my own project with  
unittest. I though importing phobos header would not regenerate their  
unittest modules.


Any idea of what can cause this issue? I already have reinstalled dmd  
with visualD completely.


Templates are not compiled fully until you use them.

If a unit test is inside a template, and that template wasn't instantiated  
inside phobos itself (likely for formatting), it will be instantiated,  
unit test and all, inside your code that used it.


This is a big limitation on the unit test system. There is no way to say  
what unit tests to enable, and what to disable. It's just all or nothing.


-Steve


Re: Is it normal that unittests of phobos are executed with my project build?

2014-06-16 Thread Dicebot via Digitalmars-d-learn

On Saturday, 14 June 2014 at 14:32:10 UTC, Xavier Bigand wrote:
I get a failure on a test in format.d when I build my own 
project with unittest. I though importing phobos header would 
not regenerate their unittest modules.


Any idea of what can cause this issue? I already have 
reinstalled dmd with visualD completely.


Quite likely that you use rdmd. It compiles dependencies with 
same flags as main target so if you do `rdmd -unittest app.d` all 
modules app imports will be compiled with `-unittest` as well. 
Using custom build process can fix it.


Is it normal that unittests of phobos are executed with my project build?

2014-06-14 Thread Xavier Bigand via Digitalmars-d-learn
I get a failure on a test in format.d when I build my own project with 
unittest. I though importing phobos header would not regenerate their 
unittest modules.


Any idea of what can cause this issue? I already have reinstalled dmd 
with visualD completely.