implemeted test for GdiConvertBitmap, GdiConvertBrush, GdiConvertDC, GdiConvertFont...
authorMagnus Olsen <magnus@greatlord.com>
Sat, 24 May 2008 22:20:31 +0000 (22:20 +0000)
committerMagnus Olsen <magnus@greatlord.com>
Sat, 24 May 2008 22:20:31 +0000 (22:20 +0000)
tested in xp/vista/reactos and works no fault report.

svn path=/trunk/; revision=33680

rostests/apitests/gdi32api/gdi.h
rostests/apitests/gdi32api/testlist.c
rostests/apitests/gdi32api/tests/GdiConvertBitmap.c [new file with mode: 0644]
rostests/apitests/gdi32api/tests/GdiConvertBrush.c [new file with mode: 0644]
rostests/apitests/gdi32api/tests/GdiConvertDC.c [new file with mode: 0644]
rostests/apitests/gdi32api/tests/GdiConvertFont.c [new file with mode: 0644]
rostests/apitests/gdi32api/tests/GdiConvertPalette.c [new file with mode: 0644]
rostests/apitests/gdi32api/tests/GdiConvertRegion.c [new file with mode: 0644]
rostests/apitests/gdi32api/tests/GdiGetLocalBrush.c [new file with mode: 0644]
rostests/apitests/gdi32api/tests/GdiGetLocalDC.c [new file with mode: 0644]

index 8e3c930..0f5c0d8 100644 (file)
@@ -200,4 +200,14 @@ typedef struct
 //  RECT        VisRectRegion;         // 1b8\r
 } DC_ATTR, *PDC_ATTR;\r
 \r
+HDC WINAPI GdiConvertBitmap(HDC hdc);\r
+HBRUSH WINAPI GdiConvertBrush(HBRUSH hbr);\r
+HDC WINAPI GdiConvertDC(HDC hdc);\r
+HFONT WINAPI GdiConvertFont(HFONT hfont);\r
+HPALETTE WINAPI GdiConvertPalette(HPALETTE hpal);\r
+HRGN WINAPI GdiConvertRegion(HRGN hregion);\r
+HBRUSH WINAPI GdiGetLocalBrush(HBRUSH hbr);\r
+HDC WINAPI GdiGetLocalDC(HDC hdc);\r
+\r
+\r
 \r
index e7338ba..43e1f3e 100644 (file)
 #include "tests/CreatePen.c"\r
 #include "tests/CreateRectRgn.c"\r
 #include "tests/ExtCreatePen.c"\r
+#include "tests/GdiConvertBitmap.c"\r
+#include "tests/GdiConvertBrush.c"\r
+#include "tests/GdiConvertDC.c"\r
+#include "tests/GdiConvertFont.c"\r
+#include "tests/GdiConvertPalette.c"\r
+#include "tests/GdiConvertRegion.c"\r
+#include "tests/GdiGetLocalBrush.c"\r
+#include "tests/GdiGetLocalDC.c"\r
 #include "tests/GetClipRgn.c"\r
 #include "tests/GetCurrentObject.c"\r
+#include "tests/GetDIBits.c"\r
 #include "tests/GetObject.c"\r
 #include "tests/GetStockObject.c"\r
-#include "tests/GetDIBits.c"\r
 #include "tests/SelectObject.c"\r
 #include "tests/SetDCPenColor.c"\r
 #include "tests/SetSysColors.c"\r
 \r
 \r
 \r
+\r
+\r
+\r
+\r
+\r
+\r
 /* The List of tests */\r
 TESTENTRY TestList[] =\r
 {\r
        { L"AddFontResourceA", Test_AddFontResourceA },\r
        { L"AddFontResourceEx", Test_AddFontResourceEx },\r
-    { L"CreateBitmapIndirect", Test_CreateBitmapIndirect },\r
+       { L"CreateBitmapIndirect", Test_CreateBitmapIndirect },\r
        { L"CreateCompatibleDC", Test_CreateCompatibleDC },\r
        { L"CreateFont", Test_CreateFont },\r
        { L"CreatePen", Test_CreatePen },\r
        { L"CreateRectRgn", Test_CreateRectRgn },\r
        { L"ExtCreatePen", Test_ExtCreatePen },\r
+       { L"GdiConvertBitmap", Test_GdiConvertBitmap },\r
+       { L"GdiConvertBrush", Test_GdiConvertBrush },\r
+       { L"GdiConvertBrush", Test_GdiConvertDC },\r
+       { L"GdiConvertFont", Test_GdiConvertFont },\r
+       { L"GdiConvertPalette", Test_GdiConvertPalette },\r
+       { L"GdiConvertRegion", Test_GdiConvertRegion },\r
+       { L"GdiGetLocalBrush", Test_GdiGetLocalBrush },\r
+       { L"GdiGetLocalDC", Test_GdiGetLocalDC },\r
        { L"GetClipRgn", Test_GetClipRgn },\r
        { L"GetCurrentObject", Test_GetCurrentObject },\r
+       { L"GetDIBits", Test_GetDIBits },\r
        { L"GetObject", Test_GetObject },\r
        { L"GetStockObject", Test_GetStockObject },\r
-       { L"GetDIBits", Test_GetDIBits },\r
-       { L"SetSysColors", Test_SetSysColors },\r
        { L"SelectObject", Test_SelectObject },\r
        { L"SetDCPenColor", Test_SetDCPenColor },\r
+       { L"SetSysColors", Test_SetSysColors },\r
        { L"SetWorldTransform", Test_SetWorldTransform },\r
 };\r
 \r
diff --git a/rostests/apitests/gdi32api/tests/GdiConvertBitmap.c b/rostests/apitests/gdi32api/tests/GdiConvertBitmap.c
new file mode 100644 (file)
index 0000000..bdbd4f9
--- /dev/null
@@ -0,0 +1,10 @@
+INT
+Test_GdiConvertBitmap(PTESTINFO pti)
+{
+    RTEST(GdiConvertBitmap((HDC)-1) == (HDC)-1);
+    RTEST(GdiConvertBitmap((HDC)0) == (HDC)0);
+    RTEST(GdiConvertBitmap((HDC)1) == (HDC)1);
+    RTEST(GdiConvertBitmap((HDC)2) == (HDC)2);
+    return APISTATUS_NORMAL;
+}
+
diff --git a/rostests/apitests/gdi32api/tests/GdiConvertBrush.c b/rostests/apitests/gdi32api/tests/GdiConvertBrush.c
new file mode 100644 (file)
index 0000000..20ea326
--- /dev/null
@@ -0,0 +1,9 @@
+INT
+Test_GdiConvertBrush(PTESTINFO pti)
+{
+    RTEST(GdiConvertBrush((HBRUSH)-1) == (HBRUSH)-1);
+    RTEST(GdiConvertBrush((HBRUSH)0) == (HBRUSH)0);
+    RTEST(GdiConvertBrush((HBRUSH)1) == (HBRUSH)1);
+    RTEST(GdiConvertBrush((HBRUSH)2) == (HBRUSH)2);
+    return APISTATUS_NORMAL;
+}
diff --git a/rostests/apitests/gdi32api/tests/GdiConvertDC.c b/rostests/apitests/gdi32api/tests/GdiConvertDC.c
new file mode 100644 (file)
index 0000000..302d1cb
--- /dev/null
@@ -0,0 +1,10 @@
+INT
+Test_GdiConvertDC(PTESTINFO pti)
+{
+    RTEST(GdiConvertDC((HDC)-1) == (HDC)-1);
+    RTEST(GdiConvertDC((HDC)0) == (HDC)0);
+    RTEST(GdiConvertDC((HDC)1) == (HDC)1);
+    RTEST(GdiConvertDC((HDC)2) == (HDC)2);
+    return APISTATUS_NORMAL;
+}
+
diff --git a/rostests/apitests/gdi32api/tests/GdiConvertFont.c b/rostests/apitests/gdi32api/tests/GdiConvertFont.c
new file mode 100644 (file)
index 0000000..7bb778d
--- /dev/null
@@ -0,0 +1,9 @@
+INT
+Test_GdiConvertFont(PTESTINFO pti)
+{
+    RTEST(GdiConvertFont((HFONT)-1) == (HFONT)-1);
+    RTEST(GdiConvertFont((HFONT)0) == (HFONT)0);
+    RTEST(GdiConvertFont((HFONT)1) == (HFONT)1);
+    RTEST(GdiConvertFont((HFONT)2) == (HFONT)2);
+    return APISTATUS_NORMAL;
+}
diff --git a/rostests/apitests/gdi32api/tests/GdiConvertPalette.c b/rostests/apitests/gdi32api/tests/GdiConvertPalette.c
new file mode 100644 (file)
index 0000000..5ccec30
--- /dev/null
@@ -0,0 +1,9 @@
+INT
+Test_GdiConvertPalette(PTESTINFO pti)
+{
+    RTEST(GdiConvertPalette((HPALETTE)-1) == (HPALETTE)-1);
+    RTEST(GdiConvertPalette((HPALETTE)0) == (HPALETTE)0);
+    RTEST(GdiConvertPalette((HPALETTE)1) == (HPALETTE)1);
+    RTEST(GdiConvertPalette((HPALETTE)2) == (HPALETTE)2);
+    return APISTATUS_NORMAL;
+}
diff --git a/rostests/apitests/gdi32api/tests/GdiConvertRegion.c b/rostests/apitests/gdi32api/tests/GdiConvertRegion.c
new file mode 100644 (file)
index 0000000..34f1081
--- /dev/null
@@ -0,0 +1,12 @@
+INT
+Test_GdiConvertRegion(PTESTINFO pti)
+{
+    RTEST(GdiConvertRegion((HRGN)-1) == (HRGN)-1);
+    RTEST(GdiConvertRegion((HRGN)0) == (HRGN)0);
+    RTEST(GdiConvertRegion((HRGN)1) == (HRGN)1);
+    RTEST(GdiConvertRegion((HRGN)2) == (HRGN)2);
+    RTEST(GdiConvertRegion((HRGN)3) == (HRGN)3);
+    RTEST(GdiConvertRegion((HRGN)4) == (HRGN)4);
+    return APISTATUS_NORMAL;
+}
+
diff --git a/rostests/apitests/gdi32api/tests/GdiGetLocalBrush.c b/rostests/apitests/gdi32api/tests/GdiGetLocalBrush.c
new file mode 100644 (file)
index 0000000..45b134b
--- /dev/null
@@ -0,0 +1,11 @@
+INT
+Test_GdiGetLocalBrush(PTESTINFO pti)
+{
+    RTEST(GdiGetLocalBrush((HBRUSH)-1) == (HBRUSH)-1);
+    RTEST(GdiGetLocalBrush((HBRUSH)0) == (HBRUSH)0);
+    RTEST(GdiGetLocalBrush((HBRUSH)1) == (HBRUSH)1);
+    RTEST(GdiGetLocalBrush((HBRUSH)2) == (HBRUSH)2);
+    RTEST(GdiGetLocalBrush((HBRUSH)3) == (HBRUSH)3);
+    RTEST(GdiGetLocalBrush((HBRUSH)4) == (HBRUSH)4);
+    return APISTATUS_NORMAL;
+}
diff --git a/rostests/apitests/gdi32api/tests/GdiGetLocalDC.c b/rostests/apitests/gdi32api/tests/GdiGetLocalDC.c
new file mode 100644 (file)
index 0000000..ca62675
--- /dev/null
@@ -0,0 +1,11 @@
+INT
+Test_GdiGetLocalDC(PTESTINFO pti)
+{
+    RTEST(GdiGetLocalDC((HDC)-1) == (HDC)-1);
+    RTEST(GdiGetLocalDC((HDC)0) == (HDC)0);
+    RTEST(GdiGetLocalDC((HDC)1) == (HDC)1);
+    RTEST(GdiGetLocalDC((HDC)2) == (HDC)2);
+    RTEST(GdiGetLocalDC((HDC)3) == (HDC)3);
+    RTEST(GdiGetLocalDC((HDC)4) == (HDC)4);
+    return APISTATUS_NORMAL;
+}