Summary
The current coverage engine think that the whole line is covered although the condition was not met, so maybe we have a wrong coverage percentage because some parts of the code are not tested.
For example
if (a==1) return -1;
return a;
In this case, if you test this method with the value a=2 full method will be covered, and is not. We should have test for a==1 too.
Do you have any solution you want to propose?
Avoid one line for conditions or change the coverage engine.
Where in software does this update applies to?
Maybe we need to define a writing rule to avoid the one line if conditional statement.
This will be closed when we migrate all projects to coveralls.io like neo-vm with https://github.com/neo-project/neo-vm/pull/228 .
As you can see, the 'coveralls.io` distinguish a single line https://coveralls.io/builds/27171399/source?filename=src/neo-vm/ExecutionEngine.cs#L351
Closing as requested by Shargon
Most helpful comment
This will be closed when we migrate all projects to
coveralls.iolike neo-vm with https://github.com/neo-project/neo-vm/pull/228 .As you can see, the 'coveralls.io` distinguish a single line https://coveralls.io/builds/27171399/source?filename=src/neo-vm/ExecutionEngine.cs#L351