Commit 43d426aa authored by Antoine Martin's avatar Antoine Martin
Browse files

complement: improve code coverage

* spot/twaalgos/complement.cc: removed unused code
* tests/python/except.py: test for exception raised
parent 4ca38d22
Pipeline #2734 passed with stages
in 119 minutes and 50 seconds
......@@ -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()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment