and so does h_sequence. time to fix this in swig.
This commit is contained in:
parent
48d6cf6f88
commit
aa10384709
1 changed files with 24 additions and 0 deletions
24
src/bindings/php/Tests/EndTest.php
Normal file
24
src/bindings/php/Tests/EndTest.php
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
include_once 'hammer.php';
|
||||||
|
|
||||||
|
class EndPTest extends PHPUnit_Framework_TestCase
|
||||||
|
{
|
||||||
|
protected $parser;
|
||||||
|
|
||||||
|
protected function setUp()
|
||||||
|
{
|
||||||
|
$this->parser = h_sequence(h_ch("a"), h_end_p());
|
||||||
|
}
|
||||||
|
public function testSuccess()
|
||||||
|
{
|
||||||
|
$result = h_parse($this->parser, "a");
|
||||||
|
// TODO: fixme when h_ch is fixed
|
||||||
|
$this->assertEquals(98, $result);
|
||||||
|
}
|
||||||
|
public function testFailure()
|
||||||
|
{
|
||||||
|
$result = h_parse($this->parser, "aa");
|
||||||
|
$this->assertEquals(NULL, $result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue