vendredi 23 décembre 2016

Cpputest: how to ignore a mocked call with expectNoCall

I have wrote the syntax: mock().expectNoCall("productionCode") as Cpputest.org page says. But the compiler says that mocksupport class doesn't support this type of order.

test_RFID_Drv.c:322:9: error: ‘class MockSupport’ has no member named ‘expectNoCall’mock().expectNoCall("HAL_AS393x_ReadRegisters");

How can it be used? Must I include some file at headers? Currently I have those ones for mocking:

/*! \include <CppUTest/CommandLineTestRunner.h> */
#include <CppUTest/CommandLineTestRunner.h>
/*! \include <CppUTest/TestHarness.h> */
#include <CppUTest/TestHarness.h> 
/*! \include <CppUTestExt/MockSupport.h> */
#include <CppUTestExt/MockSupport.h>

The thing is that I want to ignore one concret system call. I don't want to test it.

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire