added test for f_neg_canonical form
This commit is contained in:
parent
c495216626
commit
f7f322148e
3 changed files with 33 additions and 14 deletions
13
stl/test_utils.py
Normal file
13
stl/test_utils.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import stl
|
||||
from stl.hypothesis import SignalTemporalLogicStrategy
|
||||
|
||||
from hypothesis import given
|
||||
|
||||
|
||||
@given(SignalTemporalLogicStrategy)
|
||||
def test_f_neg_or_canonical_form(phi):
|
||||
phi2 = stl.utils.f_neg_or_canonical_form(phi)
|
||||
phi3 = stl.utils.f_neg_or_canonical_form(phi2)
|
||||
assert phi2 == phi3
|
||||
assert not any(
|
||||
isinstance(x, (stl.ast.G, stl.ast.And)) for x in phi2.walk())
|
||||
Loading…
Add table
Add a link
Reference in a new issue