1 /* memmove( 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 * memmove( void * s1, const void * s2, size_t n )
13 char * dest = (char *) s1;
14 const char * src = (const char *) s2;
38 #include "_PDCLIB_test.h"
42 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' );