-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix xdebug coverage (part1):
xdebug_get_code_coverage
return value …
…format for executed line Summary: This pull request is related to #1589 . (I will submit another pull request for supporting `XDEBUG_CC_UNUSED` and `XDEBUG_CC_DEAD_CODE` later) `xdebug_get_code_coverage()` return value format is described in https://xdebug.org/docs/code_coverage : > The returned values for each line are: > * 1: this line was executed > * -1: this line was not executed > * -2: this line did not have executable code on it According to this description, `xdebug_get_code_coverage()` should return value like: ``` [ "/path/to/foo.php" => [ 3 => 1, // executed line 3 5 => 1, // executed line 5 ] ] ``` However, hhvm's `xdebug_get_code_coverage()` currently returns value like: ``` [ "/path/to/foo.php" => [ 3 => 2, // executed line 3 (2 times) 5 => 3, // executed line 5 (3 times) ] ] ``` In this pull request, hhvm's `xdebug_get_code_coverage()` return value format for executed line is changed to follow description in https://xdebug.org/docs/code_coverage . Closes #7888 Differential Revision: D5294692 Pulled By: mofarrell fbshipit-source-id: c394e7b7b7c352edf66b2d6fa4895413b2005a35
- Loading branch information
Showing
5 changed files
with
44 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters