test runner/test dir ready to go; scons builds/executes php tests in src/bindings/php/Tests
This commit is contained in:
parent
0c0805591c
commit
23cb4d0f7c
2 changed files with 6 additions and 5 deletions
|
|
@ -1,31 +0,0 @@
|
|||
<?php
|
||||
|
||||
require("hammer.php");
|
||||
|
||||
class TestHammer extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
protected $parser;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
$this->parser = h_token("95\xa2");
|
||||
}
|
||||
public function testSuccess()
|
||||
{
|
||||
$result = h_parse($this->parser, "95\xa2");
|
||||
//var_dump($result);
|
||||
$ast = hparseresult_ast_get($result);
|
||||
//var_dump($ast);
|
||||
$token_data = hparsedtoken_token_data_get($ast);
|
||||
//var_dump($token_data);
|
||||
$bytes = htokendata_bytes_get($token_data);
|
||||
//var_dump($bytes);
|
||||
$this->assertEquals($bytes, "95\xa2");
|
||||
}
|
||||
public function testFailure()
|
||||
{
|
||||
$result = h_parse($this->parser, "95");
|
||||
$this->assertEquals($result, NULL);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue