私は構文を書きました: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>
問題は、1 つの具体的なシステム コールを無視したいということです。私はそれをテストしたくありません。