Browse Source

Test for jani property

refactoring
Matthias Volk 7 years ago
parent
commit
219b342da5
  1. 1
      CHANGELOG.md
  2. 7
      tests/logic/test_formulas.py

1
CHANGELOG.md

@ -8,6 +8,7 @@ Version 0.9
- Bindings for storm-pars - Bindings for storm-pars
- Bindings for graph constraints - Bindings for graph constraints
- Bindings for parsing JANI files
- Moved expressions from own module into storage module - Moved expressions from own module into storage module
- Travis support for build process - Travis support for build process
- Tests for documentation - Tests for documentation

7
tests/logic/test_formulas.py

@ -1,5 +1,6 @@
import stormpy import stormpy
import stormpy.logic import stormpy.logic
from helpers.helper import get_example_path
class TestFormulas: class TestFormulas:
@ -30,6 +31,12 @@ class TestFormulas:
assert str(formulas[0]) == "P" + prop assert str(formulas[0]) == "P" + prop
assert str(formulas[1]) == "R[exp]" + prop assert str(formulas[1]) == "R[exp]" + prop
def test_jani_formula(self):
_, properties = stormpy.parse_jani_model(get_example_path("dtmc", "brp.jani"))
for name, prop in properties.items():
assert "Property_brp_" in name
assert isinstance(prop, stormpy.Property)
def test_bounds(self): def test_bounds(self):
prop = "P=? [F \"one\"]" prop = "P=? [F \"one\"]"
formula = stormpy.parse_properties(prop)[0].raw_formula formula = stormpy.parse_properties(prop)[0].raw_formula

Loading…
Cancel
Save