test: fix sources unit test to call SRC_ReportSource() correctly

Call the function with current time instead of latest sample of the
first source to avoid undefined conversion of negative double to long
int.

Fixes: 07600cbd71 ("test: extend sources unit test")
This commit is contained in:
Miroslav Lichvar 2022-08-01 13:04:00 +02:00
parent 070b4f69d0
commit cd1a666e1b

View file

@ -190,6 +190,7 @@ test_unit(void)
}
for (j = 0; j < sizeof (srcs) / sizeof (srcs[0]); j++) {
SCH_GetLastEventTime(&sample.time, NULL, NULL);
SRC_ReportSource(j, &report, &sample.time);
SRC_DestroyInstance(srcs[j]);
}