Great PHP Symbol Renaming; debug build works, optimised build segfaults. is it gcc? fuck it all and let travis sort it out
This commit is contained in:
parent
bd48af7b90
commit
b9ce12f3b6
40 changed files with 228 additions and 192 deletions
|
|
@ -7,27 +7,27 @@ class LeftrecTest extends PHPUnit_Framework_TestCase
|
|||
|
||||
protected function setUp()
|
||||
{
|
||||
$this->parser = h_indirect();
|
||||
h_bind_indirect($this->parser, choice(sequence($this->parser, ch("a")), ch("a")));
|
||||
$this->parser = hammer_indirect();
|
||||
hammer_bind_indirect($this->parser, hammer_choice(hammer_sequence($this->parser, hammer_ch("a")), hammer_ch("a")));
|
||||
}
|
||||
|
||||
public function testSuccess1()
|
||||
{
|
||||
$result = h_parse($this->parser, "a");
|
||||
$result = hammer_parse($this->parser, "a");
|
||||
$this->assertEquals("a", $result);
|
||||
}
|
||||
/* These don't work in the underlying C so they won't work here either */
|
||||
/*
|
||||
public function testSuccess2()
|
||||
{
|
||||
$result = h_parse($this->parser, "aa");
|
||||
$result = hammer_parse($this->parser, "aa");
|
||||
var_dump($result);
|
||||
$this->assertEquals(array("a", "a"), $result);
|
||||
}
|
||||
|
||||
public function testSuccess3()
|
||||
{
|
||||
$result = h_parse($this->parser, "aaa");
|
||||
$result = hammer_parse($this->parser, "aaa");
|
||||
var_dump($result);
|
||||
$this->assertEquals(array(array("a", "a"), "a"), $result);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue