acc: turn some assertions into exceptions
* spot/misc/bitset.cc, spot/misc/bitset.hh (set, clear): Turn asserts into exceptions. * spot/twa/acc.hh (mark_t): As a consequence, the constructor is not noexcept anymore. * tests/core/acc.cc, tests/python/except.py: More tests.
This commit is contained in:
parent
be0997c97a
commit
6d9d35c985
5 changed files with 46 additions and 6 deletions
|
|
@ -137,5 +137,18 @@ try:
|
|||
except RuntimeError as e:
|
||||
assert "Too many acceptance sets" in str(e)
|
||||
else:
|
||||
print(n, m)
|
||||
report_missing_exception()
|
||||
|
||||
try:
|
||||
m.set(n)
|
||||
except RuntimeError as e:
|
||||
assert "bit index is out of bounds" in str(e)
|
||||
else:
|
||||
report_missing_exception()
|
||||
|
||||
try:
|
||||
m = spot.mark_t([0,n,1])
|
||||
except RuntimeError as e:
|
||||
assert "bit index is out of bounds" in str(e)
|
||||
else:
|
||||
report_missing_exception()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue