1#include <assert.h>2#include <stdio.h>3#include <wchar.h>45/*6output:7testing8done9end:10*/1112int13main()14{15 wchar_t buf[30];16 wchar_t def[] = {'d', 'e', 'f', '\0'};17 wchar_t abc[] = {'a', 'b', 'c', '\0'};18 wchar_t abcdef[] = {'a', 'b', 'c', 'd', 'e', 'f', '\0'};1920 puts("testing");2122 wmemcpy(buf, abcdef, 6);23 assert(!wmemcmp(wmemmove(buf, buf+3, 3), def, 3));24 wmemcpy(buf, abcdef, 6);25 assert(!wmemcmp(wmemmove(buf, buf+3, 0), abc, 3));2627 puts("done");2829 return 0;30}