[PATCH 1/2] riched20: Implement ITextRange::GetChar.

Alexandre Julliard julliard at winehq.org
Mon Sep 15 09:44:43 CDT 2014


Jactry Zeng <wine at jactry.com> writes:

> +#define TEST_TXTRGE_GETCHAR(first, lim, expected_char)                  \
> +  create_interfaces(&w, &reOle, &txtDoc, NULL);                         \
> +  SendMessageA(w, WM_SETTEXT, 0, (LPARAM)test_text1);                   \
> +  ITextDocument_Range(txtDoc, first, lim, &txtRge);                     \
> +  pch = 0xdeadbeef;                                                     \
> +  hres = ITextRange_GetChar(txtRge, &pch);                              \
> +  ok(hres == S_OK, "ITextRange_GetChar\n");                             \
> +  ok(pch == expected_char, "got wrong char: %c\n", pch);                \
> +  ITextRange_Release(txtRge);                                           \
> +  release_interfaces(&w, &reOle, &txtDoc, NULL);

Please avoid that sort of huge macro. If necessary, use helper functions
instead.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list