Fixed issue with RegEdit_ReadReg()

Now have it correctly casting the void * to a uint8_t * before it uses
it in the tests.
This commit is contained in:
Jake Goodwin 2024-08-04 11:40:38 -07:00
parent 427a5d1786
commit cdaa4270d3
1 changed files with 5 additions and 2 deletions

View File

@ -75,8 +75,11 @@ void RegEdit_SetNum(void *reg, uint8_t num)
uint8_t RegEdit_ReadReg(void *reg)
{
uint8_t value = *(uint8_t *)reg;
mock_c()->actualCall("RegEdit_ReadReg")
->withPointerParameters("reg", reg)
->returnUnsignedIntValueOrDefault(0);
//Return value is mock controlled. So it does actually return a uint8_t
->returnUnsignedIntValueOrDefault(value);
return value;
}