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:
Meredith L. Patterson 2013-12-18 00:32:56 +01:00
parent bd48af7b90
commit b9ce12f3b6
40 changed files with 228 additions and 192 deletions

View file

@ -8,27 +8,27 @@ class ButNotTest extends PHPUnit_Framework_TestCase
protected function setUp()
{
$this->parser1 = h_butnot(ch("a"), h_token("ab"));
$this->parser2 = h_butnot(h_ch_range('0', '9'), ch('6'));
$this->parser1 = hammer_butnot(hammer_ch("a"), hammer_token("ab"));
$this->parser2 = hammer_butnot(hammer_ch_range('0', '9'), hammer_ch('6'));
}
public function testSuccess1()
{
$result1 = h_parse($this->parser1, "a");
$result2 = h_parse($this->parser1, "aa");
$result1 = hammer_parse($this->parser1, "a");
$result2 = hammer_parse($this->parser1, "aa");
$this->assertEquals("a", $result1);
$this->assertEquals("a", $result1);
}
public function testFailure1()
{
$result = h_parse($this->parser1, "ab");
$result = hammer_parse($this->parser1, "ab");
$this->assertEquals(NULL, $result);
}
public function testFailure2()
{
$result = h_parse($this->parser2, "6");
$result = hammer_parse($this->parser2, "6");
$this->assertEquals(NULL, $result);
}
}