digitalmars.D.learn - Code coverage during CTFE
- Stefan Frijters (14/14) Feb 03 2015 Recently I've hooked my code up to coveralls.io using the
Recently I've hooked my code up to coveralls.io using the convenient doveralls[1]. At first, I just did a dub test command before sending the data to coveralls, but my simulation code also has runnable tests in addition to unittests, which reaches many more lines. Today I've added an option to my testing script to merge the .lst files from various runs, basically adding up the number of times each line is hit. This seems to work just fine. However, my code also heavily uses string mixins in a couple of places, and I use functions that return the relevant strings to generate them. These functions are never called at runtime, and as such are shown with the nasty red bars for no coverage. Is it possible to get a -cov dump for code run at compile time? [1] https://github.com/ColdenCullen/doveralls
Feb 03 2015