massive-oss / mcover

A cross platform code coverage framework for Haxe with testing and profiling applications. Supports AVM1, AVM2, JavaScript, C++, PHP and Neko.
Other
59 stars 9 forks source link

Coverage on abstract functions? #56

Open haath opened 2 years ago

haath commented 2 years ago

Hello, I have a project where the only Haxe type under src/ is an abstract.

However it appears that mcover does not count abstracts as types when calculating coverage? Because even though all tests run (or fail) as they should, in the output I get the following:

----------------------------------------------------------------
OVERALL COVERAGE STATS:
    packages    0%         0 / 0      
    files       0%         0 / 0      
    classes     0%         0 / 0      
    methods     0%         0 / 0      
    statements  0%         0 / 0      
    branches    0%         0 / 0      
    lines       0%         0 / 0      
----------------------------------------------------------------
COVERAGE RESULT     0%         
----------------------------------------------------------------
utest/ui/text/PrintReport.hx:52: 
assertations: 20
successes: 20
errors: 0
failures: 0
warnings: 0
execution time: 0.004
results: ALL TESTS OK (success: true)
(unknown) : Warning : No classes match criteria in MCover macro:
(unknown) : ...     packages: [],
(unknown) : ...     classPaths: [/builds/haath/bytesize/src],
(unknown) : ...     exclusions: []

Is this intended? Should abstract type functions not count for coverage?

elsassph commented 2 years ago

mcover was created before abstract types were introduced. There certainly can be gaps.

Unfortunately at the moment there isn't an active maintainer.