fixed ch; need to figure out what to do with an array of SWIG wrapped types for sequence/choice

This commit is contained in:
Meredith L. Patterson 2013-12-01 16:07:25 -08:00
parent aa10384709
commit 4d649d93d3
9 changed files with 50 additions and 17 deletions

View file

@ -8,7 +8,7 @@ class WhitespaceTest extends PHPUnit_Framework_TestCase
protected function setUp()
{
$this->parser1 = h_whitespace(h_ch("a"));
$this->parser1 = h_whitespace(ch("a"));
$this->parser2 = h_whitespace(h_end_p());
}
public function testSuccess1()
@ -18,10 +18,10 @@ class WhitespaceTest extends PHPUnit_Framework_TestCase
$result3 = h_parse($this->parser1, " a");
$result4 = h_parse($this->parser1, "\ta");
// TODO fix these tests when h_ch is fixed
$this->assertEquals(97, $result1);
$this->assertEquals(97, $result2);
$this->assertEquals(97, $result3);
$this->assertEquals(97, $result4);
$this->assertEquals("a", $result1);
$this->assertEquals("a", $result2);
$this->assertEquals("a", $result3);
$this->assertEquals("a", $result4);
}
public function testFailure1()
{