码迷,mamicode.com
首页 > 其他好文 > 详细

about unit test

时间:2019-01-30 14:22:33      阅读:122      评论:0      收藏:0      [点我收藏+]

标签:min   code   framework   evel   nta   expect   UNC   expec   set   

  • 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

标签:min   code   framework   evel   nta   expect   UNC   expec   set   

原文地址:https://www.cnblogs.com/zjbfvfv/p/10337568.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!