现在的位置: 首页 > 综合 > 正文

找到出问题的位置—test it

2014年01月23日 ⁄ 综合 ⁄ 共 315字 ⁄ 字号 评论关闭

data_capture_module()  

{

 var_a=getfromhardware();

 var_b=getfromhardware();

 

//test view module

var_a=1; // set a const value or a simple data which you can calculated correctly in data_view_module and estimate it.

var_b=2;

//end test  

 

}

 

 

data_view_module()

{

 display(var_a);

 display(var_b);

}

 

有很多代码编译没问题但是跑起来却有问题,这里描述了一种测试方法,无需编写很多测试代码可以搞定。

抱歉!评论已关闭.