Hacker News new | ask | show | jobs
by alecbenzer 2711 days ago
I meant the test itself being poorly factored. But, even in that case, I'm not sure realizing that square(inp) == square(inp) is silly would direct you to go to manual input/output lists and not something like square(inp) == inp ^ 2.

This is of course a bit of a contrived, very simple example, so it might seem silly, but I think you can imagine more complex functions where it's less clear that "computing" the expected output in some way "cheats" the test.