coolxv / cpp-stub

C++ unit test stub(not mock) and awesome.Surpported ISA x86,x86-64,arm64,arm32,arm thumb,mips64,riscv,loongarch64.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can i mock C functin a.lib or a.so

HEYsir opened this issue · comments

commented

hello,
my project is very complex.I just want ut some function in project, whats build to lib or so.
In samples, include *.cc

你好,我有个C的嵌入式工程,应该说比较复杂,我想只对部分函数做测试,在工程内是被编译为动态库、静态库的。
我看了示例都是将源码引入到测试文件内,不知道是否可以直接对库内函数进行MOCK。

commented

我想可以关闭这个问题了,使用addr,很好解决了我的问题