complement: improve code coverage
* spot/twaalgos/complement.cc: removed unused code * tests/python/except.py: test for exception raised
This commit is contained in:
parent
4ca38d225a
commit
43d426aaae
2 changed files with 9 additions and 16 deletions
|
|
@ -310,22 +310,8 @@ namespace spot
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
auto it = succs.begin();
|
||||
while (it != succs.end())
|
||||
{
|
||||
// remove state if it should stay in s or c
|
||||
if ((*it)[t.dst] == ncsb_s
|
||||
|| (*it)[t.dst] == ncsb_c)
|
||||
{
|
||||
std::iter_swap(it, succs.end() - 1);
|
||||
succs.pop_back();
|
||||
continue;
|
||||
}
|
||||
(*it)[t.dst] = ncsb_n;
|
||||
++it;
|
||||
}
|
||||
}
|
||||
for (auto& succ: succs)
|
||||
succ[t.dst] = ncsb_n;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -152,3 +152,10 @@ except RuntimeError as e:
|
|||
assert "bit index is out of bounds" in str(e)
|
||||
else:
|
||||
report_missing_exception()
|
||||
|
||||
try:
|
||||
spot.complement_semidet(spot.translate('Gb R a', 'ba'))
|
||||
except RuntimeError as e:
|
||||
assert "requires a semi-deterministic input" in str(e)
|
||||
else:
|
||||
report_missing_exception()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue