3 ms·
Unit tests can only prove the presence of bugs; they can never prove the absence of bugs. Only a typechecker can do that (provided an appropriate implementation
by yawaramin 6y ago
Unit tests can only prove the presence of bugs; they can never prove the absence of bugs. Only a typechecker can do that (provided an appropriate implementation). E.g. here is an AVL tree that is verified balanced at the type level: https://sketch.sh/s/C7Afz38jtFRMTkkydeBgUA/ https://sketch.sh/s/C7Afz38jtFRMTkkydeBgUA/
No unit tests needed to show that it is balanced :-)