Rebuild parser, move test into test/slow

@override-unit-failures

D774978 was checked in with a broken test. New tests go in test/slow
now. The test was broken because @drussi apparently didn't rebuild the
parser after his last diff update (changing 's' to 't').
Esse commit está contido em:
Owen Yamauchi
2013-04-19 18:09:03 -07:00
commit de Sara Golemon
commit bc47e4aa91
4 arquivos alterados com 207 adições e 2 exclusões
+1 -1
Ver Arquivo
@@ -10376,7 +10376,7 @@ yyreduce:
_p->onTypeList((yyvsp[(2) - (5)]), (yyvsp[(4) - (5)]));
Token t; t.reset(); t.setText("array");
_p->onTypeAnnotation((yyval), t, (yyvsp[(2) - (5)]));
_p->onTypeSpecialization((yyval), 's'); ;}
_p->onTypeSpecialization((yyval), 't'); ;}
break;
case 705:
+140
Ver Arquivo
@@ -0,0 +1,140 @@
<?hh
function printFunc($rf) {
$rps = $rf->getParameters();
foreach($rps as $rp) {
var_dump($rp->getTypehintText());
}
var_dump($rf->getReturnTypehintText());
}
function printClass($rc) {
$rms = $rc->getMethods();
$meths = array();
foreach($rms as $rm) {
$meths[$rm->getName()] = $rm;
}
ksort($meths);
foreach($meths as $meth) {
printFunc($meth);
}
$rps = $rc->getProperties();
$props = array();
foreach($rps as $rp) {
$props[$rp->getName()] = $rp;
}
ksort($props);
foreach($props as $prop) {
var_dump($prop->getTypehintText());
}
}
function f() {
}
$rf = new ReflectionFunction('f');
printFunc($rf);
function f1(int $t) {
}
$rf = new ReflectionFunction('f1');
printFunc($rf);
function f2(@string $s) {
}
$rf = new ReflectionFunction('f2');
printFunc($rf);
function f3(?:xhp:hello $x) {
}
$rf = new ReflectionFunction('f3');
printFunc($rf);
function f100(): int {
}
$rf = new ReflectionFunction('f100');
printFunc($rf);
function f101(): string {
}
$rf = new ReflectionFunction('f101');
printFunc($rf);
function f102(): Vector<:xhp:element> {
}
$rf = new ReflectionFunction('f102');
printFunc($rf);
function f200((string, Template<A, B, ?C>, ?int, Vector<Map<C, B>>) $tuple): ?int {
}
$rf = new ReflectionFunction('f200');
printFunc($rf);
function f201((function (@int, Map<string, Map<int, Vector<string>>>):Vector<C>) $i): ClassA {
}
$rf = new ReflectionFunction('f201');
printFunc($rf);
function f202(:xhp:html-element $html): Map<string, Vector<:xhp:html-element>> {
}
$rf = new ReflectionFunction('f202');
printFunc($rf);
function f203((int, Vector<string>) $tupple): array<ClassA> {
}
$rf = new ReflectionFunction('f203');
printFunc($rf);
function f204((function (int): Vector<string>) $f): array<string, ClassA> {
}
$rf = new ReflectionFunction('f204');
printFunc($rf);
function f300<X, Y>(Y $y, ?double $d): X {
}
$rf = new ReflectionFunction('f300');
printFunc($rf);
function f301<X, Y>((function (): Vector<Y>) $f): array<string, X> {
}
$rf = new ReflectionFunction('f301');
printFunc($rf);
function f302<X, Y>((Y, X, double, string) $f): ?Y {
}
$rf = new ReflectionFunction('f302');
printFunc($rf);
class C {
public @int $a;
public ?string $b;
public Vector<C> $v;
public (string, (function(?int, (string, string)):void)) $c;
public function __construct(?int $i, (int, string) $c) {
}
static public function m1() {
}
public function m2(@double $d) : void {
}
static public function m3(Vector<Map<int, Vector<?string>>> $v, :xhp:html $x) : @array<int, ?Vector<string>> {
}
public function m4((function(@int, (string, string)): void) $v) : array<Map<string, :xhp:html>> {
}
}
$rc = new ReflectionClass('C');
printClass($rc);
class CT<X, Y> {
public @int $a;
public ?string $b;
public Vector<X> $v;
public (string, (function(?int, (X, Y)):void)) $c;
public function __construct(?int $i, (int, X) $c) {
}
static public function m1() {
}
public function m2(@Y $d) : void {
}
static public function m3(Vector<Map<int, Vector<?X>>> $v, :xhp:html $x) : @array<Y, ?Vector<string>> {
}
public function m4((function(@int, (X, string)): void) $v) : array<Map<Y, :xhp:html>> {
}
}
$rc = new ReflectionClass('CT');
printClass($rc);
trait T {
static public function m1() {
}
public function m2(@int $d) : void {
}
static public function m3(Vector<Map<int, Vector<?C>>> $v, :xhp:html $x) : @array<C, ?Vector<string>> {
}
public function m4((function(@int, (double, string)): void) $v) : array<Map<CT<int, string>, :xhp:html>> {
}
}
class TC {
use T;
}
$rc = new ReflectionClass('TC');
printClass($rc);
@@ -0,0 +1,65 @@
bool(false)
string(3) "int"
bool(false)
string(7) "@string"
bool(false)
string(11) "?:xhp:hello"
bool(false)
string(3) "int"
string(6) "string"
string(20) "Vector<:xhp:element>"
string(53) "(string, Template<A, B, ?C>, ?int, Vector<Map<C, B>>)"
string(4) "?int"
string(67) "(function (@int, Map<string, Map<int, Vector<string>>>): Vector<C>)"
string(6) "ClassA"
string(17) ":xhp:html-element"
string(38) "Map<string, Vector<:xhp:html-element>>"
string(21) "(int, Vector<string>)"
string(13) "array<ClassA>"
string(32) "(function (int): Vector<string>)"
string(21) "array<string, ClassA>"
string(1) "Y"
string(7) "?double"
string(1) "X"
string(24) "(function (): Vector<Y>)"
string(16) "array<string, X>"
string(22) "(Y, X, double, string)"
string(2) "?Y"
string(4) "?int"
string(13) "(int, string)"
bool(false)
bool(false)
string(7) "@double"
string(4) "void"
string(33) "Vector<Map<int, Vector<?string>>>"
string(9) ":xhp:html"
string(28) "@array<int, ?Vector<string>>"
string(41) "(function (@int, (string, string)): void)"
string(29) "array<Map<string, :xhp:html>>"
string(4) "@int"
string(7) "?string"
string(51) "(string, (function (?int, (string, string)): void))"
string(9) "Vector<C>"
string(4) "?int"
string(8) "(int, X)"
bool(false)
bool(false)
string(2) "@Y"
string(4) "void"
string(28) "Vector<Map<int, Vector<?X>>>"
string(9) ":xhp:html"
string(26) "@array<Y, ?Vector<string>>"
string(36) "(function (@int, (X, string)): void)"
string(24) "array<Map<Y, :xhp:html>>"
string(4) "@int"
string(7) "?string"
string(41) "(string, (function (?int, (X, Y)): void))"
string(9) "Vector<X>"
bool(false)
string(4) "@int"
string(4) "void"
string(28) "Vector<Map<int, Vector<?C>>>"
string(9) ":xhp:html"
string(26) "@array<C, ?Vector<string>>"
string(41) "(function (@int, (double, string)): void)"
string(38) "array<Map<CT<int, string>, :xhp:html>>"
+1 -1
Ver Arquivo
@@ -10372,7 +10372,7 @@ yyreduce:
_p->onTypeList((yyvsp[(2) - (5)]), (yyvsp[(4) - (5)]));
Token t; t.reset(); t.setText("array");
_p->onTypeAnnotation((yyval), t, (yyvsp[(2) - (5)]));
_p->onTypeSpecialization((yyval), 's'); ;}
_p->onTypeSpecialization((yyval), 't'); ;}
break;
case 705: