我正在对具有以下参数的函数进行单元测试;
extern int32_t
fabl_fmtstr_fprint (FILE *op UNUSED, const char *format, ...){}
我不确定“...”的论点是什么。我得到它的编译时错误。
error: declaration of C function 'int32_t fabl_fmtstr_fprint(FILE*, const char*, int)'
conflicts with
previous declaration 'int32_t fabl_fmtstr_fprint(FILE*, const char*, ...)' here
有人可以解释一下原因吗?我正在使用 CppUTest(C++) 进行单元测试。
我已经宣布这个功能是假的,因为,
FAKE_VALUE_FUNC(int32_t, fabl_fmtstr_fprint, FILE* ,const char *, int);
在这种情况下,它要求缺少“...”参数。