[GDIPLUS_WINETEST] Sync with Wine Staging 3.3. CORE-14434

This commit is contained in:
Amine Khaldi 2018-03-09 13:09:52 +01:00
parent 5f279f2d12
commit e3f6657f95
13 changed files with 453 additions and 23 deletions

View file

@ -18,7 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "precomp.h"
#include "objbase.h"
#include "gdiplus.h"
#include "wine/test.h"
#include <math.h>
#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got)
#define expectf(expected, got) ok(fabs(expected - got) < 2.0, "Expected %.2f, got %.2f\n", expected, got)
@ -1298,6 +1301,7 @@ static void test_empty_rect(void)
{
GpPath *path;
GpStatus status;
INT count;
BOOL result;
status = GdipCreatePath(FillModeAlternate, &path);
@ -1306,19 +1310,42 @@ static void test_empty_rect(void)
status = GdipAddPathRectangle(path, 0.0, 0.0, -5.0, 5.0);
expect(Ok, status);
status = GdipGetPointCount(path, &count);
expect(Ok, status);
expect(0, count);
status = GdipIsVisiblePathPoint(path, -2.0, 2.0, NULL, &result);
expect(Ok, status);
expect(FALSE, status);
expect(FALSE, result);
status = GdipAddPathRectangle(path, 0.0, 0.0, 5.0, -5.0);
expect(Ok, status);
status = GdipGetPointCount(path, &count);
expect(Ok, status);
expect(0, count);
status = GdipAddPathRectangle(path, 0.0, 0.0, 0.0, 5.0);
expect(Ok, status);
status = GdipGetPointCount(path, &count);
expect(Ok, status);
expect(0, count);
status = GdipAddPathRectangle(path, 0.0, 0.0, 5.0, 0.0);
expect(Ok, status);
status = GdipGetPointCount(path, &count);
expect(Ok, status);
expect(0, count);
status = GdipAddPathRectangle(path, 0.0, 0.0, 5.0, 0.1);
expect(Ok, status);
status = GdipGetPointCount(path, &count);
expect(Ok, status);
expect(4, count);
GdipDeletePath(path);
}