about unit test

Posted zjbfvfv

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了about unit test相关的知识,希望对你有一定的参考价值。

  • Use unify unit test framework CPPUnit 1.12.1/Visual stdio
  • Unit is a class or a function
  • Test per major component
  • Test by developer
  • Set up clean environment for each test: isolate each test
  • Test shall be automatic
  • Unit test code also in review
  • Same coding style as normal implementation
  • Only test public interfaces, no database, no network, no files operations, stub it.
  • One test one expectation
  • Meaningful naming
  • When see the result, you don’t need to debug the code

 

以上是关于about unit test的主要内容,如果未能解决你的问题,请参考以下文章