自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(19)
  • 收藏
  • 关注

原创 在Windows上创建google test单元测试环境

0. 先决条件Windows 上已安装 Cygwin,以便在Windows上编译运行C++代码。1. 建立初始目录结构E:\users\sharonmei1219 -- gtestExample   -- test   -- Makefile2. 准备测试文件,并编译

2014-12-10 08:37:55 1188

原创 Unit test enables develop in baby steps thus improve the efficiency

Assumption:Consider each line of code has apossibility of being error, which is 0.6%. Assume that each line of code isindependent with other line of code.Then, a feature of 1000 line of code w

2013-08-12 14:01:22 840

原创 Which one is waste, feature development or bug fix

BackgroundThis is observed in one project that the amount code for bug fixis almost as much as the amount of code for feature. ConclusionIf we don't have those bugs, wecan save effort, 2 times

2013-07-26 10:44:25 1099 1

原创 为Eclipse写插件 -- 完结

1. 生成plug-in包参考http://www.vogella.com/articles/EclipsePlugIn/article.html中第6节2. 参考Externding the Eclipse IDE - plug-in Development Tutorial: http://www.vogella.com/articles/EclipsePlugIn/art

2013-07-05 09:07:07 617

原创 为Eclipse写插件 -- 代码

1. 在org.sharon.cpputest.fornotes package中新建一个 CppUTestsProvider类注:在准备工作中,我们为扩展指定的类就是“org.sharon.cpputest.fornotes.CppUTestsProvider”ITestsRunnerProvider是CDT testrunner为扩展提供的接口2. 实现 g

2013-07-05 08:56:35 883

原创 为Eclipse写插件 -- 准备

0. 任务:为Eclipse写一个插件,可以显示用CppUTest写的单元测试结果。注:CppUTest是一种C++的单元测试框架1. 准备Eclipse 4.2.2CDT 8.1.2CppUTest 3.42. 新建项目"file" -> "new" -> "others..." -> "plug-in development" -> "p

2013-07-04 16:50:28 770

原创 Makefile 笔记

一,自动管理依赖 -- 为什么要写 makefile假设我们有一个源文件 a.cpp, 如果想编译链接它怎么做呢?逻辑上我们要:a.cpp -(编译)-> a.oa.o -(链接)-> a.out我们可以通过g++命令行方式完成以上操作:g++ -c a.cpp -o a.og++ a.o -o a.out我们还可以写一个makefile,然

2013-03-26 08:21:05 1309

原创 Number of Acceptance Test Cases: a meaningful measurement in sw project mgt

Some one had asked me, besides counting line of code, how to decide the complexity and working load of a feature. and how to understand where we are in a projectAnd still some one asked us another

2013-03-04 14:44:44 588

原创 Double Delete caused by 2 shared library has global object of same name, 3) Insight

To answer the 2 questions left1) when and how the linking is done?2) who calls the constructor and destructor?It took me a long journey to exploring the ELF, dynamic linking, PIC, GOT,

2013-02-21 08:44:23 1332

原创 Double Delete caused by 2 shared library has global object of same name, 2) 1st glance

The 1st question I have is what causes the double deletion?With the help of gdb, it's clear it's the destructor of Object causes the double deletegdb test(gdb) run(gdb) bt#0  0x00d2f

2013-02-20 15:51:44 629

原创 Double Delete caused by 2 shared library has global object of same name, 1) reproduce

Problem Precondition:Program linked with 2 shared library, "libSub1.so" and "libSub2.so"Each shared library defines a global object with same name, "object"Such object has memory allocation in

2013-02-20 14:39:30 499

原创 开闭原则与亡羊补牢

开闭原则希望软件对扩展开放对修改封闭但是我们无法做到让软件对任何变化方向都封闭,都容易扩展。在设计软件的时候,考虑太多将来可能的变化会导致过度设计,软件变得非常臃肿效率低下,是的设计得不偿失。 通常的建议是“亡羊补牢”当变化出现后,我们根据变化的方向重构软件。 问题是,这样做有什么意义?如果前提是我们不能确定未来软件变化的方向一种可能是,第一次出现了一种变化后,之后

2012-10-16 16:29:55 367

原创 JMock 中使用 with(equal(obj)) 检查参数

在JMock中最常用的参数检查方式是equal,该方法需要用到被检查参数的equals函数例如:被测函数是Block类的enter函数,我们要使用mock的TetrisGraphic对象来测试它 public void enter(TetrisGraphic tg) { absPos = new TPosition(5,5); tg.moveToPos(absPos);

2012-09-27 09:05:06 1338

原创 工具笔记,在Eclipse中使用JMock

下载并解压JMock: http://www.jmock.org/在Eclipse中建一个一般的Java ProjectProject -> propertiesJava Build Path -> Liberaries -> Add External JARs...选择JMock所在目录中的*.jar, 注意,要调整JUnit 和JMock的顺序,将JUnit放到最后,否则,

2012-09-25 11:14:40 1498

原创 安装 Elipse CDT 插件时遇到的问题

问题:安装CDT不能完成并得到如下信息:Cannot complete the install because one or more required items could not be found.  Software being installed: C/C++ Remote Launch 6.0.0.201202111925 (org.eclipse.cdt.launch.r

2012-09-24 09:15:56 1628

原创 Sharon's note on Command Pattern

Mapping: pattern vs. example

2012-04-20 15:36:52 469

原创 Sharon's Note on Strategy Pattern

2012-04-18 13:08:37 321

原创 需求之所以变更,是因为我们无法预测未来

Kent Beck说:“最近我读到了一份关于‘软件变更’理由的列表(要是我翻译的话,会译成清单),其中的条目包括程序员没有弄清需求,客户改变了想法,等等,唯一没有提到的是正当的变更。这样的一份列表传达出的信息是:变更总是错误的”后面他用天气预报的变化比喻需求的变化,我个人严重同意 :),需求变化在所难免最近在读“黑天鹅”,看的一头雾水,但坚持再看,这本书让我猛然了解到,预测

2012-03-29 14:56:21 417

原创 实现模式中的“对称性”

人民邮电出版社"实现模式"一书中,ThoughWorks的工程师将Symmetry翻译成对称性,这个让我迷惑了一段时间"对称"给我的感觉总是指两个物体,或者物体的两边,总之是“两”个什么东西一致协调但书中的例子说以下代码中 count++, 不“对称”了void process() {input();count++;output();}唉

2012-03-29 14:19:55 592 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除