[xdebug-dev] xdebug xdebug/tests/bug00212a.inc xdebug/tests/bug00212a.phpt xdebug/tests/bug00212b.inc xdebug/tests/bug00212b.phpt xdebug/tests/bug00212c.inc xdebug/tests/bug00212c.phpt - Added some test cases for the non-bug #212.

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Wed, 18 Oct 2006 16:47:23 +0200

Date: Wed Oct 18 16:47:23 CEST 2006
User: Derick Rethans
Directory: xdebug

Log Message:
[0.25]
- Added some test cases for the non-bug #212.

Added files:
           xdebug/tests/bug00212a.inc (new version: 1.1)
           xdebug/tests/bug00212a.phpt (new version: 1.1)
           xdebug/tests/bug00212b.inc (new version: 1.1)
           xdebug/tests/bug00212b.phpt (new version: 1.1)
           xdebug/tests/bug00212c.inc (new version: 1.1)
           xdebug/tests/bug00212c.phpt (new version: 1.1)

[FILE: /xdebug/tests/bug00212a.inc]

<?php

$action = '';

switch($action)
{
    default:
}
?>

[FILE: /xdebug/tests/bug00212a.phpt]

--TEST--
Test for bug #212: coverage coverage inaccurate.
--SKIPIF--
<?php if (!extension_loaded("xdebug")) print "skip"; ?>
--INI--
xdebug.default_enable=1
xdebug.auto_trace=0
xdebug.trace_options=0
xdebug.trace_output_dir=/tmp
xdebug.collect_params=1
xdebug.collect_return=0
xdebug.auto_profile=0
xdebug.profiler_enable=0
xdebug.dump_globals=0
xdebug.show_mem_delta=0
xdebug.trace_format=0
xdebug.extended_info=1
--FILE--
<?php
        xdebug_start_code_coverage( XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE );
        $file = realpath('./tests/bug00212a.inc');
        include $file;
        $cc = xdebug_get_code_coverage();
        xdebug_stop_code_coverage();
        var_dump($cc[$file]);
?>
--EXPECT--
array(4) {
  [5]=>
  int(1)
  [9]=>
  int(1)
  [10]=>
  int(1)
  [12]=>
  int(1)
}

[FILE: /xdebug/tests/bug00212b.inc]

<?php

try
{
    throw new Exception();
}
catch(Exception $e) {}
?>

[FILE: /xdebug/tests/bug00212b.phpt]

--TEST--
Test for bug #212: coverage coverage inaccurate.
--SKIPIF--
<?php if (!extension_loaded("xdebug")) print "skip"; ?>
--INI--
xdebug.default_enable=1
xdebug.auto_trace=0
xdebug.trace_options=0
xdebug.trace_output_dir=/tmp
xdebug.collect_params=1
xdebug.collect_return=0
xdebug.auto_profile=0
xdebug.profiler_enable=0
xdebug.dump_globals=0
xdebug.show_mem_delta=0
xdebug.trace_format=0
xdebug.extended_info=1
--FILE--
<?php
        xdebug_start_code_coverage( XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE );
        $file = realpath('./tests/bug00212b.inc');
        include $file;
        $cc = xdebug_get_code_coverage();
        xdebug_stop_code_coverage();
        var_dump($cc[$file]);
?>
--EXPECT--
array(3) {
  [7]=>
  int(1)
  [9]=>
  int(1)
  [11]=>
  int(1)
}

[FILE: /xdebug/tests/bug00212c.inc]

<?php

class foo
{
    const MESSAGE = "Hello World\n";
}

echo foo::MESSAGE;
?>

[FILE: /xdebug/tests/bug00212c.phpt]

--TEST--
Test for bug #212: coverage coverage inaccurate.
--SKIPIF--
<?php if (!extension_loaded("xdebug")) print "skip"; ?>
--INI--
xdebug.default_enable=1
xdebug.auto_trace=0
xdebug.trace_options=0
xdebug.trace_output_dir=/tmp
xdebug.collect_params=1
xdebug.collect_return=0
xdebug.auto_profile=0
xdebug.profiler_enable=0
xdebug.dump_globals=0
xdebug.show_mem_delta=0
xdebug.trace_format=0
xdebug.extended_info=1
--FILE--
<?php
        xdebug_start_code_coverage( XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE );
        $file = realpath('./tests/bug00212c.inc');
        include $file;
        $cc = xdebug_get_code_coverage();
        xdebug_stop_code_coverage();
        var_dump($cc[$file]);
?>
--EXPECT--
Hello World
array(3) {
  [6]=>
  int(1)
  [10]=>
  int(1)
  [12]=>
  int(1)
}
Received on Wed Oct 18 2006 - 16:47:29 BST

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