Writing standards for unit testing

前端 未结 10 929
自闭症患者
自闭症患者 2021-01-31 12:05

I plan to introduce a set of standards for writing unit tests into my team. But what to include?

These two posts (Unit test naming best practices and Best practices for

10条回答
  •  礼貌的吻别
    2021-01-31 12:51

    I use nearly plain English for my unit test function names. Helps to define what they do exactly:

    TEST( TestThatVariableFooDoesNotOverflowWhenCalledRecursively )
    {
    /* do test */
    }  
    

    I use C++ but the naming convention can be used anywhere.

提交回复
热议问题