1
我正在嘗試使用單個Google測試來測試方法。但是,該方法被各種子類覆蓋。我如何確保Google Test將測試應用於覆蓋正在測試的測試的所有方法?例如:如何使用Google測試將統一測試應用於所有子類?
class Base {
public:
virtual void foo() = 0;
}
class Derived : public Base{
public:
void foo(){
/*This is the code I want Google Test to test */
}
}
class Derived2 : public Base{
public:
void foo(){
/*This is the code I want Google Test to test */
}
}