|
|
|
|
|
by AndrewDucker
4337 days ago
|
|
"Compose two functions, and you still have a function. Compose ten, or a hundred, and it is still a function mapping values to values." The problem being that when you compose two functions the number of possible input combinations to function 1 multiplied by the number of possible input combinations to function 2. When you have 10 functions, each with two inputs, combining them gives you 2^10 combination to test - 1024 combinations. Whereas if you test each one separately you can test 20 combinations, and get the same coverage. |
|
You might be thinking more of testing several expressions independently, e.g. assert([f(x), g(x)] == […]). This does what you’re talking about, but I don’t think anybody (including the author of the post) was recommending this.