derick Tue, 13 Apr 2010 19:18:21 +0000
Revision: http://svn.xdebug.org/cgi-bin/viewvc.cgi?view=rev&revision=3259&root=xdebug
Log:
- Fixed bug #562: Incorrect coverage information for closure function headers.
Changed paths:
A xdebug/trunk/tests/bug00562.phpt
U xdebug/trunk/xdebug.c
Added: xdebug/trunk/tests/bug00562.phpt
===================================================================
--- xdebug/trunk/tests/bug00562.phpt (rev 0)
+++ xdebug/trunk/tests/bug00562.phpt 2010-04-13 19:18:21 UTC (rev 3259)
@@ -0,0 +1,39 @@
+--TEST--
+Test for bug #562: Incorrect coverage information for closure function headers
+--FILE--
+<?php
+
+xdebug_start_code_coverage();
+$mapped = array_map(
+ // This line is flagged as executable, but not covered in PHPUnit code coverage reports
+ function ( $value )
+ {
+ return $value;
+ },
+ array( 23, 42 )
+);
+
+var_dump( xdebug_get_code_coverage() );
+--EXPECTF--
+array(1) {
+ ["%sbug00562.php"]=>
+ array(8) {
+ [0]=>
+ int(1)
+ [4]=>
+ int(1)
+ [6]=>
+ int(1)
+ [8]=>
+ int(1)
+ [9]=>
+ int(1)
+ [10]=>
+ int(1)
+ [11]=>
+ int(1)
+ [13]=>
+ int(1)
+ }
+}
+
Modified: xdebug/trunk/xdebug.c
===================================================================
--- xdebug/trunk/xdebug.c 2010-04-13 18:19:34 UTC (rev 3258)
+++ xdebug/trunk/xdebug.c 2010-04-13 19:18:21 UTC (rev 3259)
@@ -545,6 +545,7 @@
XDEBUG_SET_OPCODE_OVERRIDE_COMMON(ZEND_PRE_INC_OBJ);
XDEBUG_SET_OPCODE_OVERRIDE_COMMON(ZEND_SWITCH_FREE);
XDEBUG_SET_OPCODE_OVERRIDE_COMMON(ZEND_QM_ASSIGN);
+ XDEBUG_SET_OPCODE_OVERRIDE_COMMON(ZEND_DECLARE_LAMBDA_FUNCTION);
XDEBUG_SET_OPCODE_OVERRIDE_ASSIGN(include_or_eval, ZEND_INCLUDE_OR_EVAL);
XDEBUG_SET_OPCODE_OVERRIDE_ASSIGN(assign, ZEND_ASSIGN);
Received on Tue Apr 13 2010 - 20:18:21 BST
This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST