digitalmars.D.learn - Is it normal that unittests of phobos are executed with my project
- Xavier Bigand (5/5) Jun 14 2014 I get a failure on a test in format.d when I build my own project with
- Steven Schveighoffer (9/14) Jun 16 2014 Templates are not compiled fully until you use them.
- Dicebot (5/10) Jun 16 2014 Quite likely that you use rdmd. It compiles dependencies with
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.
Jun 14 2014
On Sat, 14 Jun 2014 10:32:04 -0400, Xavier Bigand <flamaros.xavier 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
Jun 16 2014
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.
Jun 16 2014