1 /* memcpy( void *, const void *, size_t )
3 This file is part of the Public Domain C Library (PDCLib).
4 Permission is granted to use, modify, and / or redistribute at will.
11 void * memcpy( void * _PDCLIB_restrict s1, const void * _PDCLIB_restrict s2, size_t n )
13 char * dest = (char *) s1;
14 const char * src = (const char *) s2;
25 #include "_PDCLIB_test.h"
29 char s[] = "xxxxxxxxxxx";
30 TESTCASE( memcpy( s, abcde, 6 ) == s );
31 TESTCASE( s[4] == 'e' );
32 TESTCASE( s[5] == '\0' );
33 TESTCASE( memcpy( s + 5, abcde, 5 ) == s + 5 );
34 TESTCASE( s[9] == 'e' );
35 TESTCASE( s[10] == 'x' );