我已经写了语法: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/CommandLineTestRunner.h> */
#include <CppUTest/CommandLineTestRunner.h>
/*! \include <CppUTest/TestHarness.h> */
#include <CppUTest/TestHarness.h>
/*! \include <CppUTestExt/MockSupport.h> */
#include <CppUTestExt/MockSupport.h>
问题是我想忽略一个具体的系统调用。我不想测试它。