[xdebug-dev] Bug 0000331: assert() in code produses wrong return from xdebug_get_code_coverage()

From: <noreply[@]lists.xdebug.org>
Date: Wed, 31 Oct 2007 16:14:49 +0100

The following NEW bug has been ADDED.
======================================================================
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000331
======================================================================
Reporter: mattis
Handler:
======================================================================
Project: Xdebug
Bug ID: 331
Category: Feature/Change request
Reproducibility: always
Severity: trivial
Priority: normal
Status: new
Operating System: Windows XP
PHP Version: 5.2.4
Xdebug Version: 2.0.1
======================================================================
Date Submitted: 2007-10-31 16:14 CET
Last Modified: 2007-10-31 16:14 CET
======================================================================
Summary: assert() in code produses wrong return from xdebug_get_code_coverage()
Description:
<?php
class wrongoutput {
        public function __construct() {
                xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);
                
                new someotherclass();
                
                $data = xdebug_get_code_coverage();
                
                xdebug_stop_code_coverage();
                
                var_dump($data);
        }
}

class someotherclass {
        public function __construct() {
                $j = 2;
                assert('$j >= 0');
        }
}

new wrongoutput();
======================================================================

Bug History
Date Modified Username Field Change
======================================================================
2007-10-31 16:14mattis New Bug
2007-10-31 16:14mattis Bug Monitored: mattis
======================================================================
Received on Wed Oct 31 2007 - 16:14:54 GMT

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST