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);
}
有很多代码编译没问题但是跑起来却有问题,这里描述了一种测试方法,无需编写很多测试代码可以搞定。