Open TimurDela opened 2 years ago
Greetings,
apologies for the late reaction, I am only seeing this issue now.
I don't think you are doing anything wrong. mocov
uses a rudimentary parser to determine which lines are executable. In the current implementation, anything in a classdef
is not considered executable.
For details, see @MOcovMFile/MOcovMFile
, method get_mfile_props
.
If this issue still affects you, I may look into this and see if the parser can be made a bit smarter; but currently it does not have top priority from my side. A Pull Request would always be appreciated though.
Hi @TimurDela I am adding a minimal class example in a test repo to try this out. It seems to be working for an '@' class. The report is generated and uploaded to codecov
We can add a test in this repo to verify it is working
When I test Octave functions, the coverage report works well. but if I test classes (both with the old '@' syntax or the newer classdef) the tests run successfully but the report is empty:
It is also a bit weird that myFunctions/square.m has method tags since it is not a class but OK.
Or am I doing something wrong? It would be nice to include a working example in the repo.