|
|
|
|
|
by sn9
572 days ago
|
|
I mean the entire point of even having loop invariants is that you provably know what the properties of the program state are after the loop. An assertion can tell you if one of your assumptions is incorrect. Combined with fuzz testing, you can have much higher confidence that your code is correct. This is a stronger guarantee of program correctness than any set of unit tests you're likely to write. |
|