c – cppunit:setUp()和tearDown()
作者:互联网
我使用框架cppunit来测试我的类,我想知道是否为TEST_SUITE调用了一次TestFixture :: setUp()和TestFixture :: tearDown()方法,或者为添加到此套件的每个方法调用它们
解决方法:
这些方法包装每个单独的测试用例.从docs:
Each test runs in its own fixture so there can be no side effects
among test runs.
标签:c,unit-testing,methods,attributes,cppunit 来源: https://codeday.me/bug/20190902/1789397.html