5 ms·
Hmm, I’m thinking that removing an assertion would potentially allow your program to continue into an undefined state that the assertion was guarding. You’d al
by sixstringtheory 7y ago
Hmm, I’m thinking that removing an assertion would potentially allow your program to continue into an undefined state that the assertion was guarding.
You’d also want to watch out for the particular implementation of sorting algos... if you swap out a stable quicksort for a nonstable bubblesort, your benchmark tests might still pass, but you could wind up with different orderings of “equivalent” items in your list before/after that could cause subtle issues.
If you have a test that truly still passes regardless of any mutation, I’d have to wonder if it should exist at all.