News for hackers. Stuff that matters.
Re:What if writing tests was a joyful experience? by topaz0 on Thursday January 12, 2023 @12:52PM (#34357651)
You say it replicates the logic, but I think it's more useful to say that it describes the meaning: fib is the function on natural numbers that has that property plus the base cases fib(0) = 1 and fib(1) = 1. That's what fib means.

That said, there are plenty of cases where your reaction is justified, where the test is implemented the same way as the function it's testing when the correctness property could be specified more simply.

There are no comments on this comment yet.