3 ms·
If you have a conditional or some other piece of code that would act differently for t >= 946684800, then per TDD, you'd need a test for it to be true TDD. If y
by devmonk 16y ago
If you have a conditional or some other piece of code that would act differently for t >= 946684800, then per TDD, you'd need a test for it to be true TDD. If you don't have a conditional or different behavior that would occur with a value that large then you don't need a test, per TDD. However, if you find that values of t >= 946684800 cause a bug, then per TDD you'd write a test for it, then write the logic to handle it.
I'm not promoting real TDD, btw. Real TDD is fine as a ideal, and is achievable in many circumstances and even may make perfect sense even in an ongoing basis in some environments, but it isn't practiced to the percentage overall that the OP (in the linked post) stated, and developers that heartily promote TDD usually don't fully understand its implications when practiced fully, or what doing true TDD really involves. I'm not against writing tests, but at some point, you need to relax.