<div dir="ltr">I see that there is no call to Polygon() anywhere in the tests. I might try adding a test case for it.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jul 13, 2014 at 9:20 PM, Alexander Almaleh <span dir="ltr"><<a href="mailto:sashoalm@gmail.com" target="_blank">sashoalm@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Thanks, I'll look into it.</p><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On Jul 13, 2014 8:09 PM, "Ken Thomases" <<a href="mailto:ken@codeweavers.com" target="_blank">ken@codeweavers.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div style="word-wrap:break-word">On Jul 13, 2014, at 11:39 AM, Alexander Almaleh <<a href="mailto:sashoalm@gmail.com" target="_blank">sashoalm@gmail.com</a>> wrote:<br><div><br><blockquote type="cite"><div dir="ltr">

While testing the Polygon() function for my bug report - <a href="https://bugs.winehq.org/show_bug.cgi?id=36891" target="_blank">https://bugs.winehq.org/show_bug.cgi?id=36891</a>, I used a test program that performs a Polygon() operation on a memory device context, and then saves it to a bitmap - i.e. a *.bmp file.<div>


<br></div><div>I then compared the bitmaps produced under Windows and Wine using a program I wrote in Qt, that just compares width/height, and then makes a pixel-by-pixel comparison (and the Polygon() function did indeed produce a slightly different bitmap).</div>


<div><br></div><div>Since this process can be easily automated, I'm wondering if such a framework is already being used? If not, I could probably make a sample test program and image comparison tool, if anyone is interested.</div>


<div><br></div><div>It would be fairly easily to spot all kinds of bugs in the drawing functions using such a testing system.</div></div></blockquote><br></div><div>There are such tests.  They were central to the development of the DIB engine.  See dlls/gdi32/tests/dib.c.</div>

<div><br></div><div>The tests run under Wine or on Windows, not both in concert.  They can't directly take output from one and compare to the other.  Also, one doesn't want to store a slew of bitmaps into the tests for pixel-wise comparison.  So, the approach is to take a hash of the bitmap data and compare to a hash of a known-good bitmap.</div>

<br><div>-Ken</div><div><br></div></div></blockquote></div>
</div></div></blockquote></div><br></div>