[xdebug-general] Re: Weird behaviour with conditionals

From: Derick Rethans <derick[@]xdebug.org>
Date: Fri, 29 Oct 2004 00:10:38 +0200 (CEST)

Hello!

On Wed, 27 Oct 2004, Michiel Rook wrote:

> I'm currently developing a code coverage measurement system using
> Xdebug, Phing and PHPUnit2, and I've stumbled on a few peculiarities
> regarding Xdebug.
>
> My tool currently measures the amount of methods in a set of classes
> covered by testcases, and I would like to expand this to statements
> and conditionals covered (similar to Clover). However, whenever
> if/else if blocks are encountered by Xdebug, the code coverage report
> seems incorrect.

<snip>

> It could very well be a PHP bytecode thing, but imho lines 8 and 9 (the else
> / if ($b == 1) statements)
> should be in the code coverage results as well.

yes, they should be but the Engine doesn't add the EXT_STMT opcode into
which Xdebug can hook in at those places. I can overload some other
opcodes to make the code coverage see that those lines are executed, but
then the numerical value will be totally unlogical. I do think this is
the way to go though. I'll keep you posted on the progress.

regards,
Derick

-- 
Xdebug | http://xdebug.org | xdebug-general@lists.xdebug.org
Received on Fri Oct 29 2004 - 00:10:46 BST

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST