使用gtest测试类myPRTlsConnectionImpl,其默认构造函数中具有2个参数。我计划使用另一个名为TestMyPRTlsConnectionImpl的类:
class TestMyPRTlsConnectionImpl: public testing::Test, public mySaiPRTlsConnectionImpl {
.......
}
要将此类用作测试夹具,我希望其默认构造函数没有参数。我可以做以下事情吗?
class TestMyPRTlsConnectionImpl: public testing::Test, public
mySaiPRTlsConnectionImpl {
int a;
int b;
TestMyPRTlsConnectionImpl: mySaiPRTlsConnectionImpl(a, b),
a(5), b(6) {
........
}
}
a(5), b(6)
和mySaiPRTlsConnectionImpl(a, b)
重要吗?