MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000697XdebugUsage problems (Wrong Results)public2011-05-28 00:542011-05-29 19:29
Reportercbandy 
Assigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSGentooOS Versionstable
Product Version2.2dev 
Target VersionFixed in Version 
Summary0000697: Incorrect code coverage of function arguments when using XDEBUG_CC_UNUSED
DescriptionWhen there are three values (or variables) separated by two operators as an argument, the line is not reported as covered.

In the below example, line 8 is not reported as covered.
Steps To ReproduceScript:

<?php

xdebug_start_code_coverage(XDEBUG_CC_UNUSED);

function test()
{
    substr('', 2,
        0 + 3 + 0
    );
}

test();

print_r(xdebug_get_code_coverage());


Actual Result:

Array
(
    [code_coverage.php] => Array
        (
            [5] => 1
            [7] => 1
            [8] => -1
            [9] => 1
            [10] => 1
            [12] => 1
            [14] => 1
        )

)


Expected Result:

Array
(
    [code_coverage.php] => Array
        (
            [5] => 1
            [7] => 1
            [8] => 1
            [9] => 1
            [10] => 1
            [12] => 1
            [14] => 1
        )

)
Additional InformationPHP 5.3.6-pl0-gentoo, Xdebug r3441
TagsNo tags attached.
Operating System
PHP Version5.3.6
Attached Files

- Relationships

-  Notes
(0001751)
derick (administrator)
2011-05-29 19:29

Fixed in SVN for 2.1.2 and 2.2-dev.

- Issue History
Date Modified Username Field Change
2011-05-28 00:54 cbandy New Issue
2011-05-29 19:29 derick Note Added: 0001751
2011-05-29 19:29 derick Status new => closed
2011-05-29 19:29 derick Assigned To => derick
2011-05-29 19:29 derick Resolution open => fixed
2016-07-31 13:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 13:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker