testbed的测试模式

[复制链接]
 楼主| keer_zu 发表于 2022-11-9 15:18 | 显示全部楼层 |阅读模式
如果是unit test,所有子函数都要打桩;如果是module test,可以选择性的对函数打桩;如果是white box,只能对没有函数体实现的外部函数打桩。
 楼主| keer_zu 发表于 2022-11-10 14:09 | 显示全部楼层
  1. #include <vector>
  2. #include "common.base.ngw.pb.h"
  3. using namespace std;
  4. namespace ngw{
  5. class TestCassStub{
  6. public:
  7.         TestCassStub(){}
  8.         ~TestCassStub(){}
  9.         vector<int> app_data()
  10.         {
  11.                 return _data;
  12.         }

  13.         //ngw::PriorityEnum priority()
  14.         ::ngw::FdbSendMessageRequest_PriorityEnum priority()
  15.         {
  16.                 return _prio;
  17.         }

  18.         vector<int> _data;
  19.         //ngw::FdbSendMessageRequest::PriorityEnum _prio;
  20.         ::ngw::FdbSendMessageRequest_PriorityEnum _prio;
  21. };
  22. }
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1473

主题

12899

帖子

55

粉丝
快速回复 返回顶部 返回列表