5 /* memmove( void *, const void *, size_t )
7 This file is part of the Public Domain C Library (PDCLib).
8 Permission is granted to use, modify, and / or redistribute at will.
13 void * memmove( void * s1, const void * s2, size_t n )
15 char * dest = (char *) s1;
16 const char * src = (const char *) s2;
37 #include <_PDCLIB_test.h>
41 char s[] = "xxxxabcde";
43 TESTCASE( memmove( s, s + 4, 5 ) == s );
44 TESTCASE( s[0] == 'a' );
45 TESTCASE( s[4] == 'e' );
46 TESTCASE( s[5] == 'b' );
47 TESTCASE( memmove( s + 4, s, 5 ) == s + 4 );
48 TESTCASE( s[4] == 'a' );