3 ms·
Now write a unit test for the inline block of code within the longer function which would have become the nested function??? You write the test (where any is n
by Roboprog 8y ago
Now write a unit test for the inline block of code within the longer function which would have become the nested function???
You write the test (where any is needed) for the outer function.
Edit: the start of the discussion was about using nested functions to decompose what otherwise would have been “unpartitioned” long functions. Such blocks of code nested within a long function would not be possible to unit test, either.
Unit tests, rather than integration tests, are usually bogus, anyway, though.