eth_compileSerpent
This commit is contained in:
parent
6095c92900
commit
1d02b8ba2e
@ -252,6 +252,13 @@ class Eth
|
|||||||
'validators' => StringValidator::class
|
'validators' => StringValidator::class
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
],
|
||||||
|
'eth_compileSerpent' => [
|
||||||
|
'params' => [
|
||||||
|
[
|
||||||
|
'validators' => StringValidator::class
|
||||||
|
]
|
||||||
|
]
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -809,6 +809,31 @@ class EthTest extends TestCase
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* testCompileSerpent
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function testCompileSerpent()
|
||||||
|
{
|
||||||
|
$eth = $this->eth;
|
||||||
|
|
||||||
|
$eth->compileSerpent('\/* some serpent *\/', function ($err, $compiled) {
|
||||||
|
if ($err !== null) {
|
||||||
|
return $this->fail($err->getMessage());
|
||||||
|
}
|
||||||
|
if (isset($compiled->result)) {
|
||||||
|
$this->assertTrue(is_string($compiled->result));
|
||||||
|
} else {
|
||||||
|
// if (isset($compilers->error)) {
|
||||||
|
$this->assertTrue(true);
|
||||||
|
// } else {
|
||||||
|
// $this->assertTrue(true);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testUnallowedMethod
|
* testUnallowedMethod
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user