mem: Correct testcases
Currently the 'mem' module testcases use test/run.c even though they don't
rely on access to the module internals. They're also missing an include
of mem.c, which has the effect that on systems with a C library memmem()
implementaiton, only that is tested, not the (re-)implementation in the
mem module itself. This corrects that by moving run.c to api.c/
Additionally, the memmem() testcases don't cover the case where the
"needle" appears multiple times in the "haystack". This patch also adds
such a test.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Showing
Please register or sign in to comment