资源简介
《测试驱动的嵌入式C语言开发》一书源码,学习TDD的好资源。
代码片段和文件信息
/*
* Copyright (c) 2007 Michael Feathers James Grenning and Bas Vodde
* All rights reserved.
*
* Redistribution and use in source and binary forms with or without
* modification are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE EARLIER MENTIONED AUTHORS ‘‘AS IS‘‘ AND ANY
* EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY
* DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES
* (INCLUDING BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include “CppUTest/CommandLineTestRunner.h“
#include “CppUTest/TestPlugin.h“
#include “CppUTest/TestRegistry.h“
#include “CppUTestExt/MockSupportPlugin.h“
class MyDummyComparator : public MockNamedValueComparator
{
public:
virtual bool isEqual(void* object1 void* object2)
{
return object1 == object2;
}
virtual SimpleString valueToString(void* object)
{
return StringFrom(object);
}
};
int main(int ac char** av)
{
MyDummyComparator dummyComparator;
MockSupportPlugin mockPlugin;
mockPlugin.installComparator(“MyDummyType“ dummyComparator);
TestRegistry::getCurrentRegistry()->installPlugin(&mockPlugin);
return CommandLineTestRunner::RunAllTests(ac av);
}
#include “ApplicationLib/AllTests.h“
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2012-06-14 02:42 code\
文件 2179 2012-06-14 02:42 code\.cdtproject
文件 20038 2012-06-14 02:42 code\.cproject
文件 76 2012-06-14 02:42 code\.gdb_history
文件 2274 2012-06-14 02:42 code\.project
目录 0 2012-06-14 02:42 code\.settings\
文件 421 2012-06-14 02:42 code\.settings\org.eclipse.cdt.core.prefs
文件 874 2012-06-14 02:42 code\BookCode.dsw
目录 0 2012-06-14 02:42 code\CppUTest\
文件 2179 2012-06-14 02:42 code\CppUTest\.cdtproject
文件 2832 2012-06-14 02:42 code\CppUTest\.cproject
文件 2614 2012-06-14 02:42 code\CppUTest\.project
目录 0 2012-06-14 02:42 code\CppUTest\.settings\
文件 12692 2012-06-14 02:42 code\CppUTest\.settings\org.eclipse.cdt.core.prefs
文件 130 2012-06-14 02:42 code\CppUTest\.settings\org.eclipse.cdt.ui.prefs
目录 0 2012-06-14 02:42 code\CppUTest\build\
文件 2422 2012-06-14 02:42 code\CppUTest\build\alltests.mmp
文件 2674 2012-06-14 02:42 code\CppUTest\build\bld.inf
文件 6815 2012-06-14 02:42 code\CppUTest\build\ComponentMakefile
文件 1204 2012-06-14 02:42 code\CppUTest\build\ComponentMakefileExampleParameters
文件 2282 2012-06-14 02:42 code\CppUTest\build\cpputest.mmp
文件 11848 2012-06-14 02:42 code\CppUTest\build\MakefileWorker.mk
文件 157 2012-06-14 02:42 code\CppUTest\build\StaticLibMakefile
文件 605 2012-06-14 02:42 code\CppUTest\cleanAll.sh
文件 67701 2012-06-14 02:42 code\CppUTest\cpputest-hist.txt
文件 11593 2012-06-14 02:42 code\CppUTest\CppUTest.dsp
文件 825 2012-06-14 02:42 code\CppUTest\CppUTest.dsw
文件 7455 2012-06-14 02:42 code\CppUTest\CppUTest.mak
文件 1500 2012-06-14 02:42 code\CppUTest\CppUTest.sln
文件 12900 2012-06-14 02:42 code\CppUTest\CppUTest.vcproj
目录 0 2012-06-14 02:42 code\CppUTest\examples\
............此处省略812个文件信息
相关资源
- 成都理工大学2018unity试题
- Unity3D调用Native OpenGL渲染方式
- 测试驱动嵌入式C语言开发中英文合集
- UGUI Scrollrect滚动优化:无限循环利用
- 嵌入式C语言面试题汇总
- 在Unity3d中使用C++ DLL
- 超简单的ntrip客户端C语言实现.docx
- 嵌入式C语言技术实战开发一书源代码
- Unity3d调用Lua
- Unity3D:讯飞实现语音识别功能语音转
- VS2015社区版,cn_visual_studio_community_2
- 大富豪前后端前unity后c++源码,内含几
- VisualStudio_Community_2017_安装包
- 嵌入式CC++语言精华文章集锦
- 条形码嵌入式C语言生成源码
- C语言进阶(东南大学 凌明)完整版
评论
共有 条评论