implemeted test for GdiDeleteLocalDC, GdiReleaseLocalDC, GdiSetAttrs
authorMagnus Olsen <magnus@greatlord.com>
Sat, 24 May 2008 22:42:46 +0000 (22:42 +0000)
committerMagnus Olsen <magnus@greatlord.com>
Sat, 24 May 2008 22:42:46 +0000 (22:42 +0000)
tested in xp/vista/reactos and works no fault report.

svn path=/trunk/; revision=33681

rostests/apitests/gdi32api/gdi.h
rostests/apitests/gdi32api/testlist.c
rostests/apitests/gdi32api/tests/GdiDeleteLocalDC.c [new file with mode: 0644]
rostests/apitests/gdi32api/tests/GdiReleaseLocalDC.c [new file with mode: 0644]
rostests/apitests/gdi32api/tests/GdiSetAttrs.c [new file with mode: 0644]

index 0f5c0d8..deff65e 100644 (file)
@@ -208,6 +208,9 @@ HPALETTE WINAPI GdiConvertPalette(HPALETTE hpal);
 HRGN WINAPI GdiConvertRegion(HRGN hregion);\r
 HBRUSH WINAPI GdiGetLocalBrush(HBRUSH hbr);\r
 HDC WINAPI GdiGetLocalDC(HDC hdc);\r
+BOOL WINAPI GdiDeleteLocalDC(HDC hdc);\r
+BOOL WINAPI GdiReleaseLocalDC(HDC hdc);\r
+BOOL WINAPI GdiSetAttrs(HDC hdc);\r
 \r
 \r
 \r
index 43e1f3e..d666360 100644 (file)
 #include "tests/GdiConvertFont.c"\r
 #include "tests/GdiConvertPalette.c"\r
 #include "tests/GdiConvertRegion.c"\r
+#include "tests/GdiDeleteLocalDC.c"\r
 #include "tests/GdiGetLocalBrush.c"\r
 #include "tests/GdiGetLocalDC.c"\r
+#include "tests/GdiReleaseLocalDC.c"\r
+#include "tests/GdiSetAttrs.c"\r
 #include "tests/GetClipRgn.c"\r
 #include "tests/GetCurrentObject.c"\r
 #include "tests/GetDIBits.c"\r
@@ -38,6 +41,7 @@
 \r
 \r
 \r
+\r
 /* The List of tests */\r
 TESTENTRY TestList[] =\r
 {\r
@@ -55,8 +59,11 @@ TESTENTRY TestList[] =
        { L"GdiConvertFont", Test_GdiConvertFont },\r
        { L"GdiConvertPalette", Test_GdiConvertPalette },\r
        { L"GdiConvertRegion", Test_GdiConvertRegion },\r
+       { L"GdiDeleteLocalDC", Test_GdiDeleteLocalDC },\r
        { L"GdiGetLocalBrush", Test_GdiGetLocalBrush },\r
        { L"GdiGetLocalDC", Test_GdiGetLocalDC },\r
+       { L"GdiReleaseLocalDC", Test_GdiReleaseLocalDC },\r
+       { L"GdiSetAttrs", Test_GdiSetAttrs },\r
        { L"GetClipRgn", Test_GetClipRgn },\r
        { L"GetCurrentObject", Test_GetCurrentObject },\r
        { L"GetDIBits", Test_GetDIBits },\r
diff --git a/rostests/apitests/gdi32api/tests/GdiDeleteLocalDC.c b/rostests/apitests/gdi32api/tests/GdiDeleteLocalDC.c
new file mode 100644 (file)
index 0000000..efeb214
--- /dev/null
@@ -0,0 +1,9 @@
+INT
+Test_GdiDeleteLocalDC(PTESTINFO pti)
+{
+    RTEST(GdiDeleteLocalDC((HDC)-1) == TRUE);
+    RTEST(GdiDeleteLocalDC((HDC)0) == TRUE);
+    RTEST(GdiDeleteLocalDC((HDC)1) == TRUE);
+    RTEST(GdiDeleteLocalDC((HDC)2) == TRUE);
+    return APISTATUS_NORMAL;
+}
diff --git a/rostests/apitests/gdi32api/tests/GdiReleaseLocalDC.c b/rostests/apitests/gdi32api/tests/GdiReleaseLocalDC.c
new file mode 100644 (file)
index 0000000..5c4196c
--- /dev/null
@@ -0,0 +1,9 @@
+INT
+Test_GdiReleaseLocalDC(PTESTINFO pti)
+{
+    RTEST(GdiReleaseLocalDC((HDC)-1) == TRUE);
+    RTEST(GdiReleaseLocalDC((HDC)0) == TRUE);
+    RTEST(GdiReleaseLocalDC((HDC)1) == TRUE);
+    RTEST(GdiReleaseLocalDC((HDC)2) == TRUE);
+    return APISTATUS_NORMAL;
+}
diff --git a/rostests/apitests/gdi32api/tests/GdiSetAttrs.c b/rostests/apitests/gdi32api/tests/GdiSetAttrs.c
new file mode 100644 (file)
index 0000000..9e534d5
--- /dev/null
@@ -0,0 +1,9 @@
+INT
+Test_GdiSetAttrs(PTESTINFO pti)
+{
+    RTEST(GdiSetAttrs((HDC)-1) == TRUE);
+    RTEST(GdiSetAttrs((HDC)0) == TRUE);
+    RTEST(GdiSetAttrs((HDC)1) == TRUE);
+    RTEST(GdiSetAttrs((HDC)2) == TRUE);
+    return APISTATUS_NORMAL;
+}