在testbed中实现类的替换
有时候一个类没有找到它的有效定义,只可以看到它的方法,这时候可以通过类的替换(桩类)来完成单元测试。打开这里:
输入:
/*
* Pre-include code will be placed here
* this code is located at global scope and should consist of
* declarations, preprocessor directives (e.g. #include) or procedures
*/
#include <vector>
using namespace std;
namespace ngw{
class TestCassStub{
public:
TestCassStub(){}
~TestCassStub(){}
vector<int> app_data()
{
return _data;
}
//private:
vector<int> _data;
};
}
using FdbSendMessageRequest = ngw::TestCassStub;
本帖最后由 keer_zu 于 2022-11-9 10:52 编辑
gdb调试
在
/home/xxx/src/bsp/apps/qnx_ap
运行 . setenv_qos220.sh --external ~/src/qnx/qnx710_
. setenv_qos220.sh --external ~/src/qnx/qnx710_host/
页:
[1]