News for hackers. Stuff that matters.
Re:I am disappointed by dynamic typing by int_19h on Tuesday November 29, 2022 @11:21PM (#33796993)
Program behaving to the spec is something you'd write a functional test for; but OP is most likely talking about unit tests. If you're testing e.g. individual functions in isolation, you don't know how they're actually used on the outside, so you have to test for invalid inputs that the language allows - just like in a functional test, you have to test for invalid inputs coming from the environment.

(There is a separate argument over what proportion of functional vs unit testing is optimal.)

There are no comments on this comment yet.