I'm freshly out of college, and starting university somewhere next week. We've seen unit tests, but we kinda not used them much; and everyone talks about them, so I figured maybe I should do some.
The problem is, I don't know what to test. Should I test the common case? The edge case? How do I know that a function is adequately covered?
I always have the terrible feeling that while a test will prove that a function works for a certain case, it's utterly useless to prove that the function works, period.
Best Answer
My personal philosophy has thusfar been: