You can’t even unit-test for correct program logic, unless you’re able to enumerate all possible inputs and states within a short time frame.
You can get close enough by testing only the known edge cases. If you need more mathematical proofs can give it but they are much harder.
You can get close enough by testing only the known edge cases. If you need more mathematical proofs can give it but they are much harder.