Port debugger unit tests for break command to new framework

Port debugger unit tests for break command to new framework to prepare for added many more tests dealing with nested namespaces.
Esse commit está contido em:
Herman Venter
2013-06-12 14:35:49 -07:00
commit de sgolemon
commit 2c37e4477e
12 arquivos alterados com 337 adições e 0 exclusões
+24
Ver Arquivo
@@ -0,0 +1,24 @@
<?php
// Warning: line numbers are sensitive, do not change
function foo($x) {
$y = $x.'_suffix';
error_log($y);
}
class cls {
public function pubObj($x) {
error_log("pubObj:".$x);
}
public static function pubCls($x) {
error_log("pubCls:".$x);
}
public function pubHardBreak($x) {
error_log("pubHardBreak:".$x);
hphpd_break();
error_log("pubHardBreak:done");
}
}
error_log('break1.php loaded');
+80
Ver Arquivo
@@ -0,0 +1,80 @@
Program %s/break1.php loaded. Type '[r]un' or '[c]ontinue' to go.
run
break1.php loaded
Program %s/break1.php exited normally.
break break1.php:7
Breakpoint 1 set on line 7 of break1.php
@ foo('test_break1')
Breakpoint 1 reached at foo() on line 7 of %s/break1.php
6 $y = $x.'_suffix';
7 error_log($y);
8 }
variable
$x = "test_break1"
$y = "test_break1_suffix"
break clear all
All breakpoints are cleared.
continue
test_break1_suffix
break foo()
Breakpoint 1 set upon entering foo()
@ foo('test_break2')
Breakpoint 1 reached at foo() on line 6 of %s/break1.php
5 function foo($x) {
6 $y = $x.'_suffix';
7 error_log($y);
variable
$x = "test_break2"
break clear all
All breakpoints are cleared.
continue
test_break2_suffix
break cls::pubObj()
Breakpoint 1 set upon entering cls::pubObj()
@ $break3=new cls()
@ $break3->pubObj('test_break3')
Breakpoint 1 reached at cls::pubObj() on line 12 of %s/break1.php
11 public function pubObj($x) {
12 error_log("pubObj:".$x);
13 }
variable
$x = "test_break3"
break clear all
All breakpoints are cleared.
continue
pubObj:test_break3
break cls::pubCls()
Breakpoint 1 set upon entering cls::pubCls()
@ cls::pubCls('test_break4')
Breakpoint 1 reached at cls::pubCls() on line 15 of %s/break1.php
14 public static function pubCls($x) {
15 error_log("pubCls:".$x);
16 }
variable
$x = "test_break4"
break clear all
All breakpoints are cleared.
continue
pubCls:test_break4
@ $break5=new cls()
@ $break5->pubHardBreak('test_break5')
pubHardBreak:test_break5
Break at cls::pubHardBreak() on line 19 of %s/break1.php
18 error_log("pubHardBreak:".$x);
19 hphpd_break();
20 error_log("pubHardBreak:done");
continue
pubHardBreak:done
quit
+26
Ver Arquivo
@@ -0,0 +1,26 @@
run
break break1.php:7
@ foo('test_break1')
variable
break clear all
continue
break foo()
@ foo('test_break2')
variable
break clear all
continue
break cls::pubObj()
@ $break3=new cls()
@ $break3->pubObj('test_break3')
variable
break clear all
continue
break cls::pubCls()
@ cls::pubCls('test_break4')
variable
break clear all
continue
@ $break5=new cls()
@ $break5->pubHardBreak('test_break5')
continue
quit
+19
Ver Arquivo
@@ -0,0 +1,19 @@
<?php
// Warning: line numbers are sensitive, do not change
function foo2($x) {
$y = $x.'_suffix';
error_log($y);
}
class cls2 {
public function pubObj($x) {
error_log("pubObj2:".$x);
}
public static function pubCls($x) {
error_log("pubCls2:".$x);
}
}
error_log('break1.inc1 loaded');
+47
Ver Arquivo
@@ -0,0 +1,47 @@
Program %s/break2.php loaded. Type '[r]un' or '[c]ontinue' to go.
break break2.php:7
Breakpoint 1 set on line 7 of break2.php
break foo2()
Breakpoint 2 set upon entering foo2()
break cls2::pubObj()
Breakpoint 3 set upon entering cls2::pubObj()
break cls2::pubCls()
Breakpoint 4 set upon entering cls2::pubCls()
run
break1.inc1 loaded
Program %s/break2.php exited normally.
@ foo2('test_break6')
Breakpoint 2 reached at foo2() on line 6 of %s/break2.php
5 function foo2($x) {
6 $y = $x.'_suffix';
7 error_log($y);
continue
Breakpoint 1 reached at foo2() on line 7 of %s/break2.php
6 $y = $x.'_suffix';
7 error_log($y);
8 }
@ $break6=new cls2()
@ $break6->pubObj('test_break6')
Breakpoint 3 reached at cls2::pubObj() on line 12 of %s/break2.php
11 public function pubObj($x) {
12 error_log("pubObj2:".$x);
13 }
continue
pubObj2:test_break6
@ cls2::pubCls('test_break6')
Breakpoint 4 reached at cls2::pubCls() on line 15 of %s/break2.php
14 public static function pubCls($x) {
15 error_log("pubCls2:".$x);
16 }
break clear all
All breakpoints are cleared.
continue
pubCls2:test_break6
quit
+14
Ver Arquivo
@@ -0,0 +1,14 @@
break break2.php:7
break foo2()
break cls2::pubObj()
break cls2::pubCls()
run
@ foo2('test_break6')
continue
@ $break6=new cls2()
@ $break6->pubObj('test_break6')
continue
@ cls2::pubCls('test_break6')
break clear all
continue
quit
+20
Ver Arquivo
@@ -0,0 +1,20 @@
<?php
namespace TestNs;
// Warning: line numbers are sensitive, do not change
function foo($x) {
$y = $x.'_suffix';
\error_log($y);
}
class cls {
public function pubObj($x) {
\error_log("pubObj:".$x);
}
public static function pubCls($x) {
\error_log("pubCls:".$x);
}
}
\error_log('break3.php loaded');
+52
Ver Arquivo
@@ -0,0 +1,52 @@
Program %s/break3.php loaded. Type '[r]un' or '[c]ontinue' to go.
continue
break3.php loaded
Program %s/break3.php exited normally.
break \TestNs\foo()
Breakpoint 1 set upon entering TestNs\foo()
@ \TestNs\foo('test_break7')
Breakpoint 1 reached at TestNs\foo() on line 7 of %s/break3.php
6 function foo($x) {
7 $y = $x.'_suffix';
8 \error_log($y);
variable
$x = "test_break7"
break clear all
All breakpoints are cleared.
continue
test_break7_suffix
break TestNs\cls::pubObj()
Breakpoint 1 set upon entering TestNs\cls::pubObj()
@ $break8=new \TestNs\cls()
@ $break8->pubObj('test_break8')
Breakpoint 1 reached at TestNs\cls::pubObj() on line 13 of %s/break3.php
12 public function pubObj($x) {
13 \error_log("pubObj:".$x);
14 }
variable
$x = "test_break8"
break clear all
All breakpoints are cleared.
continue
pubObj:test_break8
break \TestNs\cls::pubCls()
Breakpoint 1 set upon entering TestNs\cls::pubCls()
@ \TestNs\cls::pubCls('test_break9')
Breakpoint 1 reached at TestNs\cls::pubCls() on line 16 of %s/break3.php
15 public static function pubCls($x) {
16 \error_log("pubCls:".$x);
17 }
variable
$x = "test_break9"
break clear all
All breakpoints are cleared.
continue
pubCls:test_break9
quit
+18
Ver Arquivo
@@ -0,0 +1,18 @@
continue
break \TestNs\foo()
@ \TestNs\foo('test_break7')
variable
break clear all
continue
break TestNs\cls::pubObj()
@ $break8=new \TestNs\cls()
@ $break8->pubObj('test_break8')
variable
break clear all
continue
break \TestNs\cls::pubCls()
@ \TestNs\cls::pubCls('test_break9')
variable
break clear all
continue
quit
+13
Ver Arquivo
@@ -0,0 +1,13 @@
<?php
// Warning: line numbers are sensitive, do not change
class :fb:my:thing {
function doIt() {
echo "doing my thing\n";
}
}
error_log('break4.php loaded');
+18
Ver Arquivo
@@ -0,0 +1,18 @@
Program %s/break4.php loaded. Type '[r]un' or '[c]ontinue' to go.
break :fb:my:thing::doIt()
Breakpoint 1 set upon entering xhp_fb__my__thing::doIt()
continue
break4.php loaded
Program %s/break4.php exited normally.
@ :fb:my:thing::doIt()
Breakpoint 1 reached at xhp_fb__my__thing::doIt() on line 8 of %s/break4.php
7 function doIt() {
8 echo "doing my thing\n";
9 }
break clear all
All breakpoints are cleared.
continue
doing my thing
quit
+6
Ver Arquivo
@@ -0,0 +1,6 @@
break :fb:my:thing::doIt()
continue
@ :fb:my:thing::doIt()
break clear all
continue
quit