3 ms·
Unit tests are just example-based tests. They cannot test the code does nothing wrong in any case, they just test that in 1 specific case, it works. Only proof
by candiodari 8y ago
Unit tests are just example-based tests. They cannot test the code does nothing wrong in any case, they just test that in 1 specific case, it works.
Only proof-based methods can prove code works under every case.
If you're interested, see Coq [1] (including the first guaranteed-correct C compiler) or Isabelle.
[1] https://en.wikipedia.org/wiki/Coq https://en.wikipedia.org/wiki/Coq