Then it is clear that you do not understand unit testing.
Perhaps you could explain how you would "unit test" a function
that applies a chaotic formulae to a pair of doubles ?
How do you know if it is the -right- formula? If it is
used as part of an authentication process, how do you know
that there aren't any "back doors" in it that would allow
greatly reduced cost to break in?
There's a simple transform function that has been studied a
fair bit; I don't recall it's proper name. It goes like this:
If the input is even, divide it by 2.
If the input is odd, multiply it by 3 and add 1.
Loop back and repeat using the previous output as input.
As far as I know, it is an open question as to whether every
starting integer will eventually get drawn to the loop
1 -> 4 -> 2 -> 1 . Suppose, though, you had a hypothesis
that there were some values that did not get caught in that
loop, and suppose you further hypothesized that such numbers
would have some particular set of properties. In order to
"unit test" the section that tests the properties, you need
a valid input to feed the section -- but you don't know
yet what the valid inputs *are* because you haven't found
a non-looping number yet. How do you proceed?
In order to unit test without exhaustive search, you have to know some
valid inputs. Not just one either -- you need different inputs
that together cover all branch conditions. If you test small sections
in isolation without sufficient context, yuu might miss a
combination of conditions that is important, such as "sleeper" code
that only activates under particular combinations of circumstances.
You might have to back-solve a cryptographic puzzle in order to
determine whether or not a particular combination of circumstances
*can* occur.
You are, I would suggest, too closely focused on situations in
which the "right answer" is known and testable. If you are
working on scientific or mathematical problems, then you
don't always know, and the only way to test might be to
execute the code.