|
|
|
|
|
by avgcorrection
1252 days ago
|
|
You use the naive implementation as a test oracle, limit `n` to something small (through the property tester), and use the test oracle on your efficient implementation. Unit testing elegant functions has no value. (fib is often used as an example. But you asked how to test it.) |
|
This is just an example of course but elegant functions might need to be tested.