我已经编写了语法:mock().expectNoCall("productionCode"),如Cpputest.org页面所述。但是编译器说mocksupport类不支持这种顺序。
test_RFID_Drv.c:322:9: error: ‘class MockSupport’ has no member named ‘expectNoCall’mock().expectNoCall("HAL_AS393x_ReadRegisters");
怎么用呢?我必须在页眉处包含一些文件吗?目前我有一些是用来嘲弄的:
/*! \include <CppUTest
我试图编译的项目以前在Git存储库中,并通过在Ubuntu终端中调用make进行编译。现在,我将项目移动到Subversion存储库,当我从终端调用make时,会出现一个错误:
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
FWVersion: 0.00-re8k-hal-2014-08-15
BuildTag:
考虑到make不应该是一个存储库指导工具
我刚从C++开始,试着学习一些基础知识。现在使用Eclipse5.2.1版编译,项目是用c++11参数编译的。
现在,当我尝试使用#include <map>时,就会出现包含问题(只要编译器进入其中,我甚至还没有使用map,只是尝试包含它)。据我所知,地图本身有问题,但似乎不对。简短的失败片段。
08:54:59 **** Incremental Build of configuration Debug for project RpnCalculator ****
make all
Building file: ../Test/AddShouldBeRegistered.cpp
我正在尝试编译我的测试组项目,但是自从下一次编译错误之后,我没有成功,在输出中我无法理解:
控制台输出:
"test_TestHW.c: In member function ‘virtual void TEST_TestHW_TestHW_main_Test::testBody()’:
test_TestHW.c:617:6: error: request for member ‘enable’ in ‘mock’, which is
of non-class type ‘MockSupport&(const SimpleString&, MockFailureR
我有一个makefile,如下所示:
我的cpp文件中有:
#include "CppUTest/CommandLineTestRunner.h"
int main(int ac, const char** av)
{
/* These checks are here to make sure assertions outside test runs don't crash */
CHECK(true);
LONGS_EQUAL(1, 1);
return CommandLineTestRunner::RunAllTests(ac, av);
}
然后我得到了错误