2013-11-30 17:18:58 -08:00
|
|
|
<?php
|
|
|
|
|
include_once 'hammer.php';
|
|
|
|
|
|
|
|
|
|
class EndPTest extends PHPUnit_Framework_TestCase
|
|
|
|
|
{
|
|
|
|
|
protected $parser;
|
|
|
|
|
|
|
|
|
|
protected function setUp()
|
|
|
|
|
{
|
2013-12-01 16:07:25 -08:00
|
|
|
$this->parser = sequence(ch("a"), h_end_p());
|
2013-11-30 17:18:58 -08:00
|
|
|
}
|
2013-12-01 16:07:25 -08:00
|
|
|
|
2013-11-30 17:18:58 -08:00
|
|
|
public function testSuccess()
|
|
|
|
|
{
|
2013-12-01 16:07:25 -08:00
|
|
|
echo 'in testSuccess\n';
|
|
|
|
|
// $result = h_parse($this->parser, "a");
|
2013-11-30 17:18:58 -08:00
|
|
|
// TODO: fixme when h_ch is fixed
|
2013-12-01 16:07:25 -08:00
|
|
|
// $this->assertEquals(98, $result);
|
2013-11-30 17:18:58 -08:00
|
|
|
}
|
2013-12-01 16:07:25 -08:00
|
|
|
/*
|
2013-11-30 17:18:58 -08:00
|
|
|
public function testFailure()
|
|
|
|
|
{
|
|
|
|
|
$result = h_parse($this->parser, "aa");
|
|
|
|
|
$this->assertEquals(NULL, $result);
|
|
|
|
|
}
|
2013-12-01 16:07:25 -08:00
|
|
|
*/
|
2013-11-30 17:18:58 -08:00
|
|
|
}
|
|
|
|
|
?>
|