You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case, mutations of Iter::next() may cause t1 to fail and t2 to hang. This is counted as a timeout, but could be detected rapidly as a caught mutant, and this might make cargo-mutants more useful on codebases that have a lot of this kind of code (stopping conditions that can be trivially mutated into running forever).
Detecting this case would require parsing the test harness output which could sometimes be corrupted (stray logging to real stderr) or arbitrary (custom test harnesses), so it should be optional.
(In the example case above, it would arguably be wise for t2 to have its own maximum-iterations guard condition, but in the general case, the loop may be part of code that is not test code and cannot predict the maximum number of iterations.)
The text was updated successfully, but these errors were encountered:
Yep, #194 has some other related ideas. I think the heart of it is: the standard Rust test framework does not exit early when one test fails, but at least for the cargo mutants use case it would be better if it did.
Consider a case where a mutation causes a hang, but is also detected by a test:
In this case, mutations of
Iter::next()
may causet1
to fail andt2
to hang. This is counted as a timeout, but could be detected rapidly as a caught mutant, and this might makecargo-mutants
more useful on codebases that have a lot of this kind of code (stopping conditions that can be trivially mutated into running forever).Detecting this case would require parsing the test harness output which could sometimes be corrupted (stray logging to real stderr) or arbitrary (custom test harnesses), so it should be optional.
(In the example case above, it would arguably be wise for
t2
to have its own maximum-iterations guard condition, but in the general case, the loop may be part of code that is not test code and cannot predict the maximum number of iterations.)The text was updated successfully, but these errors were encountered: