+1
+2
-1

How to set input and expected values for void pointer parameters ?

Posting in: 

2 Answers:

+1
+1
-1

Hi,

Let's say the function under test is

void *uut(void *a)
{
  static int b;
  b = *(int *) a;
  b = b + 1;
  return (void *)&b;
}

For the...

+1
+1
-1

Sorry didn't read your question correctly.

void uut(void *a)
{
  int b = *(int *) a;
  b = b + 1;
  *(int *)a = b;
}

Input is the same as previous email....