How do I unit test a protected method in C++?

后端 未结 6 1718
遇见更好的自我
遇见更好的自我 2020-12-28 16:57

How do I unit test a protected method in C++?

In Java, I\'d either create the test class in the same package as the class under test or create an anonymous subcla

6条回答
  •  猫巷女王i
    2020-12-28 17:45

    I use CxxTest and have the CxxTest derive from the class that contains the protected member function. If you're still searching around for your favorite C++ Unit Testing framework, take a look at this article.

提交回复
热议问题