vendredi 23 décembre 2016

CPPUTEST: How to ignore only one call placed between other ones

I would like to ignore one call placed between other ones that I want to call under the same case test. If I use ignoreothercalls I have not clear if the rest of the calls, following this, will be called. I need the rest, after ignored call, will be called. Or at least, to find the way of stopping ignoreothercalls effect before the end of the test case.

TEST(group, test1){

    ...
    mock().expectOneCall("HAL_AS393x_CommandStrobes").withParameter("cCommandCode",AS393X_CMD_CALIB_RCO_LC);    
    /*-------------------------------------------------------*/
    mock().expectOneCall("HAL_AS393x_ReadRegisters");//I want ignore only this mocked function call
    /*-------------------------------------------------*/
    mock().expectOneCall("HAL_AS393x_Deinit");
    ...

}

Aucun commentaire:

Enregistrer un commentaire