3 /* memmove( void *, const void *, size_t )
5 This file is part of the Public Domain C Library (PDCLib).
6 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;
39 #include <_PDCLIB_test.h>
43 char s[] = "xxxxabcde";
44 TESTCASE( memmove( s, s + 4, 5 ) == s );
45 TESTCASE( s[0] == 'a' );
46 TESTCASE( s[4] == 'e' );
47 TESTCASE( s[5] == 'b' );
48 TESTCASE( memmove( s + 4, s, 5 ) == s + 4 );
49 TESTCASE( s[4] == 'a' );