How do you tell that your unit tests are correct?

后端 未结 16 1273
广开言路
广开言路 2020-12-28 16:23

I\'ve only done minor unit testing at various points in my career. Whenever I start diving into it again, it always troubles me how to prove that my tests are correct. How

16条回答
  •  长发绾君心
    2020-12-28 16:53

    You don't tell. Generally, the tests will be simpler than the code they're testing, so the idea is simply that they'll be less likely to have bugs than the real code will.

提交回复
热议问题