// S : tags libc c // S : expect --result valid // S : cc -o test.bc -D_PDCLIB_BUILD -DTEST $file // S : verify -o nofail:malloc test.bc #include #include #include #include "_PDCLIB_test.h" int main( void ) { char s[] = "xxxxabcde"; TESTCASE( memmove( s, s + 4, 5 ) == s ); TESTCASE( s[0] == 'a' ); TESTCASE( s[4] == 'e' ); TESTCASE( s[5] == 'b' ); TESTCASE( memmove( s + 4, s, 5 ) == s + 4 ); TESTCASE( s[4] == 'a' ); return TEST_RESULTS; }