2 ms·
For Fibonacci (or indeed the result of most mathematical calculations) it makes no sense but I use this kind of thing all the time where the expected output is
by pydry 4y ago
For Fibonacci (or indeed the result of most mathematical calculations) it makes no sense but I use this kind of thing all the time where the expected output is, for example, a templated string like an error message.
There are plenty of kinds of test outputs where rewriting the test and eyeballing the result is quicker, easier and ultimately better.
- polio 4y agoIt makes sense in scenarios where it's easier to verify a provided solution than it is to create one.