fix and check shifting issue
The exception raised by << and >> when shifting mark_t by too many bits are only enabled in SPOT_DEBUG, as those operations are quite low-level. However we were always testing them, and although we wanted them to be active in Python, it was not always the case. * spot/twa/acc.hh: introduce max_accsets() as a static constexpr method, so we can see it in Python. * spot/misc/bitset.hh: Fix preprocessing directive so the check is actually enabled when compiling the Python bindings. * bin/autcross.cc, bin/autfilt.cc, bin/ltlcross.cc: Use max_accsets(). * tests/core/acc.cc: Comment out the shifting exception when SPOT_DEBUG is unset. * tests/python/except.py: Make sure the exception is always raised in Python.
This commit is contained in:
parent
23e0d718fd
commit
b12eb0508f
7 changed files with 75 additions and 38 deletions
|
|
@ -691,7 +691,8 @@ namespace
|
|||
const spot::const_twa_graph_ptr& aut_j,
|
||||
size_t i, size_t j, bool icomp, bool jcomp)
|
||||
{
|
||||
if (aut_i->num_sets() + aut_j->num_sets() > SPOT_MAX_ACCSETS)
|
||||
if (aut_i->num_sets() + aut_j->num_sets() >
|
||||
spot::acc_cond::mark_t::max_accsets())
|
||||
{
|
||||
// Report the skipped test if both automata are not
|
||||
// complemented, or the --verbose option is used,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue