aboutsummaryrefslogtreecommitdiffstats
path: root/test/mem/memmove_prefix.c
blob: a6715c711e1b3ce882b1cc9836c4c4ff4778a4d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#include <mem.h>

static char const src[] = "hello";
static char dest[sizeof(src)] = {0};

int main(void) {
	calt_memmove(dest, src, 3);
	return calt_memcmp(src, dest, 3) == 0
		   ? calt_memcmp("\0\0\0", dest + 3, 3) == 0 ? 0 : 1
		   : 1;
}