aboutsummaryrefslogtreecommitdiffstats
path: root/test/mem/memcpy_prefix.c
blob: 675f2bcc3aec54bb2c9535bcfc9c079b907def71 (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_memcpy(dest, src, 3);
	return calt_memcmp(src, dest, 3) == 0
		   ? calt_memcmp("\0\0\0", dest + 3, 3) == 0 ? 0 : 1
		   : 1;
}