unittests not being run

2016-07-15 Thread Bahman Movaqar via Digitalmars-d-learn
The test I have in 'app.d' don't get picked up by 'dub test' in a freshly created project by 'dub init'. $ dub test Generating test runner configuration '__test__library__' for 'library' (library). Performing "unittest" build using dmd for x86_64. dplay ~master: building configurat

Re: unittests not being run

2016-07-15 Thread Jerry via Digitalmars-d-learn
Unittests have to be inside a module to be run on DMD atleast. So putting module foo at top should fix it.

Re: unittests not being run

2016-07-15 Thread Bahman Movaqar via Digitalmars-d-learn
On 07/15/2016 04:16 PM, Jerry wrote: > Unittests have to be inside a module to be run on DMD atleast. > So putting module foo at top should fix it. Strange. Still not getting picked up. $ dmd --version DMD64 D Compiler v2.071.0 Copyright (c) 1999-2015 by Digital Mars written by Walte

Re: unittests not being run

2016-07-16 Thread Seb via Digitalmars-d-learn
On Friday, 15 July 2016 at 11:59:51 UTC, Bahman Movaqar wrote: On 07/15/2016 04:16 PM, Jerry wrote: Unittests have to be inside a module to be run on DMD atleast. So putting module foo at top should fix it. Strange. Still not getting picked up. $ dmd --version DMD64 D Compiler v2.071

Re: unittests not being run

2016-07-16 Thread Bahman Movaqar via Digitalmars-d-learn
On 07/17/2016 12:38 AM, Seb wrote: > There is no need for a module, but dub by default only checks files in > the 'source' folder. The file is already in the 'source' folder. > For such simple tests you could also run them directly with rdmd > -unittest. There is an additional -main flag if you d