Closed (fixed)
Project:
Code coverage
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
12 Mar 2010 at 22:48 UTC
Updated:
13 Jun 2012 at 11:41 UTC
And figure out a way to deal with them.
For example: http://imagebin.ca/view/TyoeOu.html
Comments
Comment #1
boombatower commentedAnother weird deal: http://imagebin.ca/view/MUU3rwI.html.
Comment #2
boombatower commentedMarking #639102: wrong coverage on curly brace after return statement in favor of general Xdebug issue.
Recording lines that come back with XDEBUG_CC_DEAD_CODE partly solves the issue, but oddly doesn't solve it completely.
Comment #3
sunThe mentioned flag + the UNUSED flag is used by the patch in #983808: Fix Simpletest integration
However, the overall results are very poor, even with the latest Xdebug stable. For example, code coverage report tells me that an experimental class (which happens to live within a file that has been loaded) is 100% covered, even though the class is never instantiated. Same behavior with procedural code in a .module file.
Comment #4
sunLooks like this is just simply a logic error. We currently do:
but the combined XDEBUG_CC_DEAD_CODE | XDEBUG_CC_UNUSED flag leads to $count being negative for affected lines, as explained by the xdebug maintainer in http://www.slideshare.net/sebastian_bergmann/analysing-php-code
Thus, should be
Will incorporate that into #983808: Fix Simpletest integration
Comment #5
sunOf course, it must be
http://twitter.com/#!/tha_sun/statuses/82248712830730243
Comment #6
berdirNice find, do we need to do something additional with that? For example, to mark dead code (closing } in functions as in the presentation) to not show up as untested? I haven't looked at the results yet.
Comment #7
boombatower commentedI just pushed a bunch of commits that were developed for ReviewDriven. I believe this is now fixed.