[PATCH 1/4] gdiplus/tests: Add metafile playback test for EMR_RESTOREDC.

Zebediah Figura z.figura12 at gmail.com
Tue Jun 30 10:03:04 CDT 2020


On 6/30/20 9:58 AM, Shawn M. Chapla wrote:
> On Mon, Jun 29, 2020 at 07:49:50PM -0500, Jeff Smith wrote:
>>> +static void test_restoredc(void)
>>> +{
>>> +    static const GpPointF dst_points[3] = {{0.0,0.0},{100.0,0.0},{0.0,100.0}};
>>> +    static const GpRectF frame = {0.0, 0.0, 100.0, 100.0};
>>> +    static const WCHAR description[] = {'w','i','n','e','t','e','s','t',0};
>>
>> As GDI+ is being built as a PE, it should be fine to remove 'description' ...
>>
>>> +    stat = GdipRecordMetafile(hdc, EmfTypeEmfOnly, &frame, MetafileFrameUnitPixel,
>>> +        description, &metafile);
>>
>> and replace it here with L"winetest" (unless Esme has an objection).
> 
> I used `description` here to match the rest of the test functions in
> this file and in a possibly misguided attempt to follow the guidelines
> on the WineHQ Developer Hints wiki page [1]. So long as it isn't going
> to cause any problems, I'm happy to use `L"winetest"` instead.
> 
> [1] https://wiki.winehq.org/Developer_Hints#Using_only_C89-compliant_code
> 

Yeah, those guides are outdated, like much of what's on the wiki. The
move to PE is recent, such that most files still contain explicitly
spelled out WCHAR strings.

FYI, you can tell whether a module is built as PE by checking for the
"-mno-cygwin" flag in its Makefile.in. All tests are also PE.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20200630/79099780/attachment.sig>


More information about the wine-devel mailing list