gdiplus: First pen test.
This commit is contained in:
parent
63bfd40f61
commit
fcd7a62e93
|
@ -240,6 +240,9 @@ dlls/gdi32/tests/testlist.c
|
||||||
dlls/gdi32/version.res
|
dlls/gdi32/version.res
|
||||||
dlls/gdi32/version16.res
|
dlls/gdi32/version16.res
|
||||||
dlls/gdiplus/libgdiplus.def
|
dlls/gdiplus/libgdiplus.def
|
||||||
|
dlls/gdiplus/tests/*.ok
|
||||||
|
dlls/gdiplus/tests/gdiplus_crosstest.exe
|
||||||
|
dlls/gdiplus/tests/testlist.c
|
||||||
dlls/glu32/libglu32.def
|
dlls/glu32/libglu32.def
|
||||||
dlls/gphoto2.ds/rsrc.res
|
dlls/gphoto2.ds/rsrc.res
|
||||||
dlls/hhctrl.ocx/hhctrl.res
|
dlls/hhctrl.ocx/hhctrl.res
|
||||||
|
@ -845,6 +848,7 @@ programs/winetest/dnsapi_test.exe
|
||||||
programs/winetest/dplayx_test.exe
|
programs/winetest/dplayx_test.exe
|
||||||
programs/winetest/dsound_test.exe
|
programs/winetest/dsound_test.exe
|
||||||
programs/winetest/gdi32_test.exe
|
programs/winetest/gdi32_test.exe
|
||||||
|
programs/winetest/gdiplus_test.exe
|
||||||
programs/winetest/hlink_test.exe
|
programs/winetest/hlink_test.exe
|
||||||
programs/winetest/infosoft_test.exe
|
programs/winetest/infosoft_test.exe
|
||||||
programs/winetest/iphlpapi_test.exe
|
programs/winetest/iphlpapi_test.exe
|
||||||
|
|
|
@ -234,6 +234,7 @@ ALL_MAKEFILES = \
|
||||||
dlls/gdi32/Makefile \
|
dlls/gdi32/Makefile \
|
||||||
dlls/gdi32/tests/Makefile \
|
dlls/gdi32/tests/Makefile \
|
||||||
dlls/gdiplus/Makefile \
|
dlls/gdiplus/Makefile \
|
||||||
|
dlls/gdiplus/tests/Makefile \
|
||||||
dlls/glu32/Makefile \
|
dlls/glu32/Makefile \
|
||||||
dlls/gphoto2.ds/Makefile \
|
dlls/gphoto2.ds/Makefile \
|
||||||
dlls/hal/Makefile \
|
dlls/hal/Makefile \
|
||||||
|
@ -586,6 +587,7 @@ dlls/dxguid/Makefile: dlls/dxguid/Makefile.in dlls/Makeimplib.rules
|
||||||
dlls/gdi32/Makefile: dlls/gdi32/Makefile.in dlls/Makedll.rules
|
dlls/gdi32/Makefile: dlls/gdi32/Makefile.in dlls/Makedll.rules
|
||||||
dlls/gdi32/tests/Makefile: dlls/gdi32/tests/Makefile.in dlls/Maketest.rules
|
dlls/gdi32/tests/Makefile: dlls/gdi32/tests/Makefile.in dlls/Maketest.rules
|
||||||
dlls/gdiplus/Makefile: dlls/gdiplus/Makefile.in dlls/Makedll.rules
|
dlls/gdiplus/Makefile: dlls/gdiplus/Makefile.in dlls/Makedll.rules
|
||||||
|
dlls/gdiplus/tests/Makefile: dlls/gdiplus/tests/Makefile.in dlls/Maketest.rules
|
||||||
dlls/glu32/Makefile: dlls/glu32/Makefile.in dlls/Makedll.rules
|
dlls/glu32/Makefile: dlls/glu32/Makefile.in dlls/Makedll.rules
|
||||||
dlls/gphoto2.ds/Makefile: dlls/gphoto2.ds/Makefile.in dlls/Makedll.rules
|
dlls/gphoto2.ds/Makefile: dlls/gphoto2.ds/Makefile.in dlls/Makedll.rules
|
||||||
dlls/hal/Makefile: dlls/hal/Makefile.in dlls/Makedll.rules
|
dlls/hal/Makefile: dlls/hal/Makefile.in dlls/Makedll.rules
|
||||||
|
|
|
@ -20532,6 +20532,8 @@ ac_config_files="$ac_config_files dlls/gdi32/tests/Makefile"
|
||||||
|
|
||||||
ac_config_files="$ac_config_files dlls/gdiplus/Makefile"
|
ac_config_files="$ac_config_files dlls/gdiplus/Makefile"
|
||||||
|
|
||||||
|
ac_config_files="$ac_config_files dlls/gdiplus/tests/Makefile"
|
||||||
|
|
||||||
ac_config_files="$ac_config_files dlls/glu32/Makefile"
|
ac_config_files="$ac_config_files dlls/glu32/Makefile"
|
||||||
|
|
||||||
ac_config_files="$ac_config_files dlls/gphoto2.ds/Makefile"
|
ac_config_files="$ac_config_files dlls/gphoto2.ds/Makefile"
|
||||||
|
@ -21696,6 +21698,7 @@ do
|
||||||
"dlls/gdi32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/gdi32/Makefile" ;;
|
"dlls/gdi32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/gdi32/Makefile" ;;
|
||||||
"dlls/gdi32/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/gdi32/tests/Makefile" ;;
|
"dlls/gdi32/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/gdi32/tests/Makefile" ;;
|
||||||
"dlls/gdiplus/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/gdiplus/Makefile" ;;
|
"dlls/gdiplus/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/gdiplus/Makefile" ;;
|
||||||
|
"dlls/gdiplus/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/gdiplus/tests/Makefile" ;;
|
||||||
"dlls/glu32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/glu32/Makefile" ;;
|
"dlls/glu32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/glu32/Makefile" ;;
|
||||||
"dlls/gphoto2.ds/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/gphoto2.ds/Makefile" ;;
|
"dlls/gphoto2.ds/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/gphoto2.ds/Makefile" ;;
|
||||||
"dlls/hal/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/hal/Makefile" ;;
|
"dlls/hal/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/hal/Makefile" ;;
|
||||||
|
|
|
@ -1517,6 +1517,7 @@ AC_CONFIG_FILES([dlls/dxguid/Makefile])
|
||||||
AC_CONFIG_FILES([dlls/gdi32/Makefile])
|
AC_CONFIG_FILES([dlls/gdi32/Makefile])
|
||||||
AC_CONFIG_FILES([dlls/gdi32/tests/Makefile])
|
AC_CONFIG_FILES([dlls/gdi32/tests/Makefile])
|
||||||
AC_CONFIG_FILES([dlls/gdiplus/Makefile])
|
AC_CONFIG_FILES([dlls/gdiplus/Makefile])
|
||||||
|
AC_CONFIG_FILES([dlls/gdiplus/tests/Makefile])
|
||||||
AC_CONFIG_FILES([dlls/glu32/Makefile])
|
AC_CONFIG_FILES([dlls/glu32/Makefile])
|
||||||
AC_CONFIG_FILES([dlls/gphoto2.ds/Makefile])
|
AC_CONFIG_FILES([dlls/gphoto2.ds/Makefile])
|
||||||
AC_CONFIG_FILES([dlls/hal/Makefile])
|
AC_CONFIG_FILES([dlls/hal/Makefile])
|
||||||
|
|
|
@ -246,6 +246,7 @@ TESTSUBDIRS = \
|
||||||
dplayx/tests \
|
dplayx/tests \
|
||||||
dsound/tests \
|
dsound/tests \
|
||||||
gdi32/tests \
|
gdi32/tests \
|
||||||
|
gdiplus/tests \
|
||||||
hlink/tests \
|
hlink/tests \
|
||||||
infosoft/tests \
|
infosoft/tests \
|
||||||
iphlpapi/tests \
|
iphlpapi/tests \
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
TOPSRCDIR = @top_srcdir@
|
||||||
|
TOPOBJDIR = ../../..
|
||||||
|
SRCDIR = @srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
TESTDLL = gdiplus.dll
|
||||||
|
IMPORTS = gdiplus kernel32
|
||||||
|
|
||||||
|
CTESTS = \
|
||||||
|
pen.c
|
||||||
|
|
||||||
|
@MAKE_TEST_RULES@
|
||||||
|
|
||||||
|
@DEPENDENCIES@ # everything below this line is overwritten by make depend
|
|
@ -0,0 +1,92 @@
|
||||||
|
/*
|
||||||
|
* Unit test suite for pens (and init)
|
||||||
|
*
|
||||||
|
* Copyright (C) 2007 Google (Evan Stade)
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#include "windef.h"
|
||||||
|
#include "gdiplus.h"
|
||||||
|
#include "wine/test.h"
|
||||||
|
|
||||||
|
#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got)
|
||||||
|
|
||||||
|
static void test_startup(void)
|
||||||
|
{
|
||||||
|
GpPen *pen;
|
||||||
|
Status status;
|
||||||
|
struct GdiplusStartupInput gdiplusStartupInput;
|
||||||
|
ULONG_PTR gdiplusToken;
|
||||||
|
|
||||||
|
gdiplusStartupInput.GdiplusVersion = 1;
|
||||||
|
gdiplusStartupInput.DebugEventCallback = NULL;
|
||||||
|
gdiplusStartupInput.SuppressBackgroundThread = 0;
|
||||||
|
gdiplusStartupInput.SuppressExternalCodecs = 0;
|
||||||
|
|
||||||
|
status = GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
|
||||||
|
expect(Ok, status);
|
||||||
|
GdiplusShutdown(gdiplusToken);
|
||||||
|
|
||||||
|
gdiplusStartupInput.GdiplusVersion = 2;
|
||||||
|
|
||||||
|
status = GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
|
||||||
|
expect(UnsupportedGdiplusVersion, status);
|
||||||
|
GdiplusShutdown(gdiplusToken);
|
||||||
|
|
||||||
|
status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen);
|
||||||
|
|
||||||
|
todo_wine
|
||||||
|
expect(GdiplusNotInitialized, status);
|
||||||
|
|
||||||
|
GdipDeletePen(pen);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void test_constructor_destructor(void)
|
||||||
|
{
|
||||||
|
GpStatus status;
|
||||||
|
GpPen *pen = NULL;
|
||||||
|
|
||||||
|
status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen);
|
||||||
|
expect(Ok, status);
|
||||||
|
ok(pen != NULL, "Expected pen to be initialized");
|
||||||
|
|
||||||
|
status = GdipDeletePen(NULL);
|
||||||
|
expect(InvalidParameter, status);
|
||||||
|
|
||||||
|
status = GdipDeletePen(pen);
|
||||||
|
expect(Ok, status);
|
||||||
|
}
|
||||||
|
|
||||||
|
START_TEST(pen)
|
||||||
|
{
|
||||||
|
struct GdiplusStartupInput gdiplusStartupInput;
|
||||||
|
ULONG_PTR gdiplusToken;
|
||||||
|
|
||||||
|
test_startup();
|
||||||
|
|
||||||
|
gdiplusStartupInput.GdiplusVersion = 1;
|
||||||
|
gdiplusStartupInput.DebugEventCallback = NULL;
|
||||||
|
gdiplusStartupInput.SuppressBackgroundThread = 0;
|
||||||
|
gdiplusStartupInput.SuppressExternalCodecs = 0;
|
||||||
|
|
||||||
|
GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
|
||||||
|
|
||||||
|
test_constructor_destructor();
|
||||||
|
|
||||||
|
GdiplusShutdown(gdiplusToken);
|
||||||
|
}
|
|
@ -40,6 +40,7 @@ TESTBINS = \
|
||||||
dplayx_test.exe \
|
dplayx_test.exe \
|
||||||
dsound_test.exe \
|
dsound_test.exe \
|
||||||
gdi32_test.exe \
|
gdi32_test.exe \
|
||||||
|
gdiplus_test.exe \
|
||||||
hlink_test.exe \
|
hlink_test.exe \
|
||||||
infosoft_test.exe \
|
infosoft_test.exe \
|
||||||
iphlpapi_test.exe \
|
iphlpapi_test.exe \
|
||||||
|
@ -121,6 +122,8 @@ dsound_test.exe: $(DLLDIR)/dsound/tests/dsound_test.exe$(DLLEXT)
|
||||||
cp $(DLLDIR)/dsound/tests/dsound_test.exe$(DLLEXT) $@ && $(STRIP) $@
|
cp $(DLLDIR)/dsound/tests/dsound_test.exe$(DLLEXT) $@ && $(STRIP) $@
|
||||||
gdi32_test.exe: $(DLLDIR)/gdi32/tests/gdi32_test.exe$(DLLEXT)
|
gdi32_test.exe: $(DLLDIR)/gdi32/tests/gdi32_test.exe$(DLLEXT)
|
||||||
cp $(DLLDIR)/gdi32/tests/gdi32_test.exe$(DLLEXT) $@ && $(STRIP) $@
|
cp $(DLLDIR)/gdi32/tests/gdi32_test.exe$(DLLEXT) $@ && $(STRIP) $@
|
||||||
|
gdiplus_test.exe: $(DLLDIR)/gdiplus/tests/gdiplus_test.exe$(DLLEXT)
|
||||||
|
cp $(DLLDIR)/gdiplus/tests/gdiplus_test.exe$(DLLEXT) $@ && $(STRIP) $@
|
||||||
hlink_test.exe: $(DLLDIR)/hlink/tests/hlink_test.exe$(DLLEXT)
|
hlink_test.exe: $(DLLDIR)/hlink/tests/hlink_test.exe$(DLLEXT)
|
||||||
cp $(DLLDIR)/hlink/tests/hlink_test.exe$(DLLEXT) $@ && $(STRIP) $@
|
cp $(DLLDIR)/hlink/tests/hlink_test.exe$(DLLEXT) $@ && $(STRIP) $@
|
||||||
infosoft_test.exe: $(DLLDIR)/infosoft/tests/infosoft_test.exe$(DLLEXT)
|
infosoft_test.exe: $(DLLDIR)/infosoft/tests/infosoft_test.exe$(DLLEXT)
|
||||||
|
|
|
@ -163,6 +163,7 @@ dnsapi_test.exe TESTRES "dnsapi_test.exe"
|
||||||
dplayx_test.exe TESTRES "dplayx_test.exe"
|
dplayx_test.exe TESTRES "dplayx_test.exe"
|
||||||
dsound_test.exe TESTRES "dsound_test.exe"
|
dsound_test.exe TESTRES "dsound_test.exe"
|
||||||
gdi32_test.exe TESTRES "gdi32_test.exe"
|
gdi32_test.exe TESTRES "gdi32_test.exe"
|
||||||
|
gdiplus_test.exe TESTRES "gdiplus_test.exe"
|
||||||
hlink_test.exe TESTRES "hlink_test.exe"
|
hlink_test.exe TESTRES "hlink_test.exe"
|
||||||
infosoft_test.exe TESTRES "infosoft_test.exe"
|
infosoft_test.exe TESTRES "infosoft_test.exe"
|
||||||
iphlpapi_test.exe TESTRES "iphlpapi_test.exe"
|
iphlpapi_test.exe TESTRES "iphlpapi_test.exe"
|
||||||
|
|
Loading…
Reference in New Issue