* wrap/python/tests/ltlparse.py: New file.
* wrap/python/tests/Makefile.am (TESTS): Add it.
This commit is contained in:
parent
d21c64d1a2
commit
c160eba524
3 changed files with 33 additions and 0 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
2003-08-04 Alexandre Duret-Lutz <aduret@src.lip6.fr>
|
||||||
|
|
||||||
|
* wrap/python/tests/ltlparse.py: New file.
|
||||||
|
* wrap/python/tests/Makefile.am (TESTS): Add it.
|
||||||
|
|
||||||
2003-08-01 Alexandre Duret-Lutz <aduret@src.lip6.fr>
|
2003-08-01 Alexandre Duret-Lutz <aduret@src.lip6.fr>
|
||||||
|
|
||||||
* wrap/python/buddy.i: New file.
|
* wrap/python/buddy.i: New file.
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,5 @@ check_SCRIPTS = run
|
||||||
|
|
||||||
TESTS = \
|
TESTS = \
|
||||||
ltlsimple.py \
|
ltlsimple.py \
|
||||||
|
ltlparse.py \
|
||||||
bddnqueen.py
|
bddnqueen.py
|
||||||
27
wrap/python/tests/ltlparse.py
Executable file
27
wrap/python/tests/ltlparse.py
Executable file
|
|
@ -0,0 +1,27 @@
|
||||||
|
import sys
|
||||||
|
import ltihooks
|
||||||
|
import spot
|
||||||
|
|
||||||
|
e = spot.default_environment.instance()
|
||||||
|
p = spot.empty_parse_error_list()
|
||||||
|
|
||||||
|
l = ['GFa', 'a U (((b)) xor c)', '!(FFx <=> Fx)', 'a \/ a \/ b \/ a \/ a'];
|
||||||
|
|
||||||
|
for str1 in l:
|
||||||
|
f = spot.parse(str1, p, e, 0)
|
||||||
|
if spot.format_parse_errors(spot.get_cout(), str1, p):
|
||||||
|
sys.exit(1)
|
||||||
|
str2 = str(f)
|
||||||
|
spot.destroy(f)
|
||||||
|
print str2
|
||||||
|
# Try to reparse the stringified formula
|
||||||
|
f = spot.parse(str2, p, e)
|
||||||
|
if spot.format_parse_errors(spot.get_cout(), str2, p):
|
||||||
|
sys.exit(1)
|
||||||
|
print f
|
||||||
|
spot.destroy(f)
|
||||||
|
|
||||||
|
assert spot.atomic_prop.instance_count() == 0
|
||||||
|
assert spot.binop.instance_count() == 0
|
||||||
|
assert spot.unop.instance_count() == 0
|
||||||
|
assert spot.multop.instance_count() == 0
|
||||||
Loading…
Add table
Add a link
Reference in a new issue