资源简介
mockcpp的一个实例,根据cpp-ut-project生成Windows vs的一个.sln文件,可以直接编译,生成ut
代码片段和文件信息
#include
#include
#include
#include
#include “..\..\..\UserModule\test\SampleFeatureTest.h“
static struct TESTCASE_TestSampleFeatureTest_test_8
: public TESTNGPP_NS::TestCase
{
TESTCASE_TestSampleFeatureTest_test_8()
: TESTNGPP_NS::TestCase
( “empty test“
“base test“
“SampleFeatureTest“
0
“SampleFeatureTest.h“
8)
{}
void setFixture(TESTNGPP_NS::TestFixture* fixture)
{
if(fixture == 0)
{
belongedFixture = new TestSampleFeatureTest();
}
else
{
belongedFixture = dynamic_cast(fixture);
}
}
void runTest()
{
belongedFixture->test_8()
;
}
TESTNGPP_NS::TestFixture* getFixture() const
{
return belongedFixture;
}
unsigned int numberOfTags() const
{
return 0;
}
const char** getTags() const
{
static const char* tags[] = {0};
return tags;
}
const char* getMemCheckSwitch() const
{
static const char* memCheckSwitch = “none“;
return memCheckSwitch;
}
private:
TestSampleFeatureTest* belongedFixture;
} testcase_instance_TestSampleFeatureTest_test_8 ;
static TESTNGPP_NS::TestCase* g_TESTCASEARRAY_TestSampleFeatureTest[] = {
&testcase_instance_TestSampleFeatureTest_test_8
0
};
/*static*/ TESTNGPP_NS::TestFixtureDesc test_fixture_desc_instance_TestSampleFeatureTest
( “base test“
“SampleFeatureTest.h“
g_TESTCASEARRAY_TestSampleFeatureTest
(sizeof(g_TESTCASEARRAY_TestSampleFeatureTest)/sizeof(g_TESTCASEARRAY_TestSampleFeatureTest[0])) - 1
);
static TESTNGPP_NS::TestFixtureDesc* array_of_fixture_desc_SampleFeatureTest[] = {
&test_fixture_desc_instance_TestSampleFeatureTest
0
};
static TESTNGPP_NS::TestSuiteDesc test_suite_desc_instance_SampleFeatureTest
( “SampleFeatureTest“
array_of_fixture_desc_SampleFeatureTest
(sizeof(array_of_fixture_desc_SampleFeatureTest)/sizeof(array_of_fixture_desc_SampleFeatureTest[0])) - 1
);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 142336 2011-08-07 17:40 build\vs2005\lib\UserModule.idb
文件 15258 2011-08-07 17:40 build\vs2005\lib\UserModule.lib
文件 126976 2011-08-07 17:40 build\vs2005\lib\usermodule.pdb
文件 17802 2011-08-07 17:40 build\vs2005\obj\TestUserModule\Debug\BuildLog.htm
文件 1106349 2011-08-07 17:40 build\vs2005\obj\TestUserModule\Debug\HelloWorldTest.obj
文件 182270 2011-08-07 17:40 build\vs2005\obj\TestUserModule\Debug\SampleFeatureTest.obj
文件 4988 2011-08-07 17:40 build\vs2005\obj\UserModule\Debug\BuildLog.htm
文件 14312 2011-08-07 17:40 build\vs2005\obj\UserModule\Debug\HelloWorld.obj
文件 7164 2011-08-07 17:40 build\vs2005\target\UserModuleTest.exp
文件 1158144 2011-08-07 17:40 build\vs2005\target\UserModuleTest.idb
文件 13102 2011-08-07 17:40 build\vs2005\target\UserModuleTest.lib
文件 438272 2011-08-07 17:40 build\vs2005\target\usermoduletest.pdb
文件 12870 2011-08-07 17:40 build\vs2005\temp\HelloWorldTest.cxx
文件 2178 2011-08-07 17:40 build\vs2005\temp\SampleFeatureTest.cpp
文件 2247680 2011-08-07 17:41 build\vs2005\UserModule.ncb
文件 1504 2011-08-07 17:40 build\vs2005\UserModule.sln
..A..H. 8192 2011-08-07 17:41 build\vs2005\UserModule.suo
文件 4358 2011-08-07 17:40 build\vs2005\UserModule.vcproj
文件 1389 2011-08-07 17:41 build\vs2005\UserModule.vcproj.XIAOSI.Administrator.user
文件 6584 2011-08-07 17:40 build\vs2005\UserModuleTest.vcproj
文件 1389 2011-08-07 17:41 build\vs2005\UserModuleTest.vcproj.XIAOSI.Administrator.user
文件 150528 2011-08-08 00:39 build\vs2008\lib\UserModule.idb
文件 16962 2011-08-08 00:39 build\vs2008\lib\UserModule.lib
文件 135168 2011-08-08 00:39 build\vs2008\lib\usermodule.pdb
文件 6686 2011-08-08 00:39 build\vs2008\obj\TestUserModule\Debug\BuildLog.htm
文件 185345 2011-08-08 00:39 build\vs2008\obj\TestUserModule\Debug\SampleFeatureTest.obj
文件 4976 2011-08-08 00:39 build\vs2008\obj\UserModule\Debug\BuildLog.htm
文件 16016 2011-08-08 00:39 build\vs2008\obj\UserModule\Debug\HelloWorld.obj
文件 830464 2011-08-08 00:39 build\vs2008\target\UserModuleTest.idb
文件 2089012 2011-08-08 00:35 build\vs2008\target\UserModuleTest.ilk
............此处省略2330个文件信息
- 上一篇:DS1302 数码管显示 带闹钟可调
- 下一篇:管理信息系统 第三版-黄梯云.pdf
评论
共有 条评论