fix python bindings for spot::parsed_formula::f getter

* python/spot/impl.i: Add a typemap.
* tests/python/ltlsimple.py: Add a test case for an issue.
* NEWS: Mention the bug.
This commit is contained in:
Alexandre Duret-Lutz 2018-08-02 23:05:22 +02:00
parent 701a3b1c6a
commit 5c8cf1bc47
3 changed files with 21 additions and 0 deletions

View file

@ -134,3 +134,11 @@ for (input, output) in [('(a&b)<->b', 'b->(a&b)'),
print(input, f, output)
assert(f == output)
assert(spot.are_equivalent(input, output))
def myparse(input):
env = spot.default_environment.instance()
pf = spot.parse_infix_psl(input, env)
return pf.f
# This used to fail, because myparse would return a pointer
# to pf.f inside the destroyed pf.
assert myparse('a U b') == spot.formula('a U b')