玩转Google开源C++单元测试框架Google Test系列(gtest)之四 - 参数化 [转载]

匿名 (未验证) 提交于 2019-12-03 00:39:02
//
boolint
{
//
if<=1returnfalse;

//
if%2==0return==2;

//

//
forint=3+=2
//
if>/break;

//
//
if%==0returnfalse;

//
returntrue;
}


{
3));
5));
11));
23));
17));
}


classpublic::testing::TestWithParam<int>
{

};


{
int=

}

35112317));





<>
classpublic
public:

<T>
static

};

<charintint>


//
//
//
=this->value_;

//
//
+=

//
//



}

<>
classpublic

};

TYPED_TEST_CASE_P(FooTest);


//
=0;

}

<charintint>



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!