[xdebug-dev] Bug 0000212: coverage coverage inaccurate

From: <xdebug-dev[@]lists.xdebug.org>
Date: Wed, 18 Oct 2006 16:20:33 +0200

The following NEW bug has been ADDED.
======================================================================
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000212
======================================================================
Reporter: swestcott
Handler:
======================================================================
Project: Xdebug
Bug ID: 212
Category: Debug client (console)
Reproducibility: always
Severity: minor
Priority: normal
Status: new
Operating System: Debian Testing
PHP Version: 5.1.6
Xdebug Version: 2.0.0rc2-dev
======================================================================
Date Submitted: 2006-10-18 16:20 CEST
Last Modified: 2006-10-18 16:20 CEST
======================================================================
Summary: coverage coverage inaccurate
Description:
Xdebug doesn't report execution of switch and try statements and class
constants. I'm not sure whether this is a feature or a bug and I couldn't
find the answer elsewhere.

  1 <?php
  2
  3 xdebug_start_code_coverage();
  4
  5 $action = '';
  6
  7 switch($action)
  8 {
  9 default:
 10 }
 11
 12 var_export(xdebug_get_code_coverage());
 13
 14 ?>

Line 7 is missing here
array (
  '/home/simon/switch_xdebug.php' =>
  array (
    5 => 1,
    9 => 1,
    10 => 1,
    12 => 1,
  ),
)

  1 <?php
  2
  3 xdebug_start_code_coverage();
  4
  5 try
  6 {
  7 throw new Exception();
  8 }
  9 catch(Exception $e) {}
 10
 11 var_export(xdebug_get_code_coverage());
 12
 13 ?>

Line 5 is missing here
array (
  '/home/simon/try_catch_xdebug.php' =>
  array (
    7 => 1,
    9 => 1,
    11 => 1,
  ),
)

  1 <?php
  2
  3 xdebug_start_code_coverage();
  4
  5 class foo
  6 {
  7 const MESSAGE = 'Hello World';
  8 }
  9
 10 echo foo::MESSAGE;
 11
 12 var_export(xdebug_get_code_coverage());
 13
 14 ?>

Line 7 is missing here
array (
  '/home/simon/const_xdebug.php' =>
  array (
    6 => 1,
    10 => 1,
    12 => 1,
  ),
)
======================================================================

Bug History
Date Modified Username Field Change
======================================================================
2006-10-18 16:20swestcott New Bug
2006-10-18 16:20swestcott Bug Monitored: swestcott
======================================================================
Received on Wed Oct 18 2006 - 16:20:36 BST

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