Re: Coverage (-cov)

2017-09-23 Thread Tony via Digitalmars-d-learn
On Sunday, 24 September 2017 at 05:48:32 UTC, Tony wrote: I am compiling a module (utils) with one function in it with the -cov compiler option on Ubuntu 14.04 with DMD v2.073.2. I then compile a "main module" with -cov that imports the "utils module" and calls the one function. The *.lst outpu

Re: Coverage

2016-02-16 Thread Chris Wright via Digitalmars-d-learn
On Tue, 16 Feb 2016 10:35:38 -0200, Leandro Motta Barros via Digitalmars-d-learn wrote: > You probably already though of it, but: can't you create a unittest that > calls your code as many times as desired, passing different input each > time? dmd -cov doesn't look specifically at unittests, so a

Re: Coverage

2016-02-16 Thread Leandro Motta Barros via Digitalmars-d-learn
I had one case these days in which I also had a lot of data to use in the test. I was able to put the data as very large regular D arrays, but this increased my compilation times a lot (not to mention the time to run the unit tests). I decided to enclose this specific unit test (including the `imp

Re: Coverage

2016-02-16 Thread Sebastiaan Koppe via Digitalmars-d-learn
On Tuesday, 16 February 2016 at 12:35:38 UTC, Leandro Motta Barros wrote: You probably already though of it, but: can't you create a unittest that calls your code as many times as desired, passing different input each time? That is a viable option yes. I will probably end up doing it like tha

Re: Coverage

2016-02-16 Thread Leandro Motta Barros via Digitalmars-d-learn
You probably already though of it, but: can't you create a unittest that calls your code as many times as desired, passing different input each time? LMB On Tue, Feb 16, 2016 at 10:16 AM, Sebastiaan Koppe via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > I currently run dmd'