我有一个 C 文件包含一些静态函数,如何使用 google test 来测试那些静态函数?
头文件:
test.h
int accessData();
源文件:
test.c
static int value;
static int getData()
{
return value;
}
int accessData()
{
if(value != 0)
{
return getData();
}
return 0;
}
静态函数由全局函数调用,但是如何使用谷歌测试来测试这些静态函数?