// 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 "_PDCLIB_test.h" int main( void ) { wchar_t s[] = L"xxxxxxxxxxx"; TESTCASE( wmemcpy( s, wabcde, 6 ) == s ); TESTCASE( s[4] == L'e' ); TESTCASE( s[5] == L'\0' ); TESTCASE( wmemcpy( s + 5, wabcde, 5 ) == s + 5 ); TESTCASE( s[9] == L'e' ); TESTCASE( s[10] == L'x' ); return TEST_RESULTS; }