scons runs a minimal unit test, which errors. debugging typemaps commences.
This commit is contained in:
parent
0733700343
commit
c51b784612
2 changed files with 32 additions and 1 deletions
24
src/bindings/php/TestHammer.php
Normal file
24
src/bindings/php/TestHammer.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
require("hammer.php");
|
||||
|
||||
class TestHammer extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
protected $parser;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
$this->parser = hammer::h_token("95\xa2", 3);
|
||||
}
|
||||
public function testSuccess()
|
||||
{
|
||||
$result = hammer::h_parse($this->parser, "95\xa2", 3);
|
||||
$this->assertEquals($result->ast->token_data->bytes, "95\xa2");
|
||||
}
|
||||
public function testFailure()
|
||||
{
|
||||
$result = hammer::h_parse($this->parser, "95", 2);
|
||||
$this->assertEquals($result, NULL);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue