Hi,
When I am trying to run both positive testcase and negative testcase it is not working properly.Giving error why is it so?
TEST(AppCallsEnableset, simpleTest)
{
uint8_t on =1;
uint8_t current_on;
mock().expectOneCall("flashRead")
.withParameter("buf",current_on )
.withParameter("CALLS_ENABLE_START_ADDRESS", 9961512)
.withParameter("len", 4)
.withParameter("CALLS_ENABLE_NVID", 16)
.andReturnValue(0);
mock().expectOneCall("flashWrite")
.withParameter("buf", on)
.withParameter("CALLS_ENABLE_START_ADDRESS", 9961512)
.withParameter("len", 4)
.withParameter("CALLS_ENABLE_NVID", 16)
.andReturnValue(0);
error_t appCallsEnableset = appcSystemSettingCallsEnableSet(on);
// assert
mock().checkExpectations();
CHECK_EQUAL(0, appCallsEnableset);
}
/*TEST(AppCallsEnableset, simpleTest2)
{
uint8_t on =1;
uint8_t current_on;
mock().expectOneCall("flashRead")
.withParameter("buf", current_on)
.withParameter("CALLS_ENABLE_START_ADDRESS", 9961512)
.withParameter("len", 4)
.withParameter("CALLS_ENABLE_NVID", 16)
.andReturnValue(0);
mock().expectOneCall("flashWrite")
.withParameter("buf", on)
.withParameter("CALLS_ENABLE_START_ADDRESS", 9961512)
.withParameter("len", 4)
.withParameter("CALLS_ENABLE_NVID", 16)
.andReturnValue(8);
error_t appCallsEnableset = appcSystemSettingCallsEnableSet(on);
// assert
mock().checkExpectations();
CHECK_EQUAL(255, appCallsEnableset);
}*/
Thanks,
Revati