Skip to content

Commit

Permalink
TEST: regression test for #40
Browse files Browse the repository at this point in the history
  • Loading branch information
slivingston committed Apr 22, 2019
1 parent 32bc137 commit 0f6d164
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/regressions_test.py
@@ -0,0 +1,22 @@
from dd import cudd


def test_reordering_setting_restore():
# Original report at https://github.com/tulip-control/dd/issues/40
b = cudd.BDD()
b.configure(reordering=False)
b.add_var('x')
b.add_var('y')
# x /\ y
s = '~ x /\ y'
u = b.add_expr(s)
assert not b.configure()['reordering']
g = b.pick_iter(u)
m = list(g)
m_ = [dict(x=False, y=True)]
assert m == m_, (m, m_)
assert not b.configure()['reordering']


if __name__ == '__main__':
test_reordering_setting_restore()

0 comments on commit 0f6d164

Please sign in to comment.