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.
15 void * memmove( void * s1, const void * s2, size_t n )
17 char * dest = (char *) s1;
18 const char * src = (const char *) s2;
41 #include <_PDCLIB_test.h>
45 char s[] = "xxxxabcde";
47 TESTCASE( memmove( s, s + 4, 5 ) == s );
48 TESTCASE( s[0] == 'a' );
49 TESTCASE( s[4] == 'e' );
50 TESTCASE( s[5] == 'b' );
51 TESTCASE( memmove( s + 4, s, 5 ) == s + 4 );
52 TESTCASE( s[4] == 'a' );