Author: gadamopoulos
Date: Tue Feb 7 12:11:26 2017
New Revision: 73747
URL:
http://svn.reactos.org/svn/reactos?rev=73747&view=rev
Log:
[USER32_APITEST]: Add more tests for RegisterClassEx.
Modified:
trunk/rostests/apitests/user32/RegisterClassEx.c
Modified: trunk/rostests/apitests/user32/RegisterClassEx.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/RegisterC…
==============================================================================
--- trunk/rostests/apitests/user32/RegisterClassEx.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/user32/RegisterClassEx.c [iso-8859-1] Tue Feb 7 12:11:26
2017
@@ -116,8 +116,14 @@
a = _GetClassAtom(L"ScrollBar", hmod);
UnregisterClass(L"ScrollBar", hmod);
b = _GetClassAtom(L"ScrollBar", hmod);
- ok( a != 0, "\n");
- ok( b == 0, "\n");
+ c = _RegisterClass(L"ScrollBar", hmod, CS_GLOBALCLASS, DefWindowProcW);
+ d = _GetClassAtom(L"ScrollBar", hmod);
+ ok( a != 0, "\n");
+ ok( b == 0, "\n");
+ ok( c != 0, "\n");
+ ok( d != 0, "\n");
+ ok( a == c, "\n");
+ ok( a == d, "\n"); /* In Windows 10 the last 4 tests fail */
a = _GetClassAtom(L"ListBox", (HMODULE)0xdead);
UnregisterClass(L"ListBox", (HMODULE)0xdead);
@@ -142,7 +148,7 @@
HANDLE h1, h2;
ULONG_PTR cookie1;
ATOM a,b,c;
- WNDPROC proc1,proc2,proc3, proc4;
+ WNDPROC proc1,proc2,proc3, proc4, proc5;
h1 = _CreateActCtxFromFile(L"verclasstest1.manifest");
h2 = _CreateActCtxFromFile(L"verclasstest2.manifest");
@@ -159,8 +165,9 @@
proc2 = _GetWndproc(L"VersionTestClass1", hmod);
c = _RegisterClass(L"VersionTestClass1", hmod, 0, DefWindowProcW);
proc3 = _GetWndproc(L"VersionTestClass1", hmod);
+ proc4 = _GetWndproc((LPCWSTR)(DWORD_PTR)a, hmod);
DeactivateActCtx(0, cookie1);
- proc4 = _GetWndproc(L"VersionTestClass1", hmod);
+ proc5 = _GetWndproc(L"VersionTestClass1", hmod);
ok( a != 0, "\n");
ok( b == 0, "\n");
ok( c != 0, "\n");
@@ -168,7 +175,8 @@
ok (proc1 == DefWindowProcA, "\n");
ok (proc2 == NULL, "\n");
ok (proc3 == DefWindowProcW, "\n");
- ok (proc4 == DefWindowProcA, "\n");
+ ok (proc4 == DefWindowProcW, "\n");
+ ok (proc5 == DefWindowProcA, "\n");
a = _GetClassAtom(L"Button", hmod);
b = _RegisterClass(L"Button", hmod, CS_GLOBALCLASS, DefWindowProcA);
@@ -181,9 +189,20 @@
ok( c != 0, "\n");
ok( a == c, "\n");
ok( proc1 != NULL, "\n");
- ok( proc2 != NULL, "\n");
ok( proc1 != proc2, "\n");
ok( proc2 == DefWindowProcA, "\n");
+
+ a = _RegisterClass(L"VersionTestClass2", hmod, CS_GLOBALCLASS,
DefWindowProcW);
+ proc1 = _GetWndproc(L"VersionTestClass2", (HMODULE)0xdead);
+ b = _RegisterClass(L"VersionTestClass2", hmod, 0, DefWindowProcA);
+ proc2 = _GetWndproc(L"VersionTestClass2", hmod);
+ ok (a != 0, "\n");
+ ok (b != 0, "\n");
+ ok (a == b, "\n");
+ ok (proc1 == DefWindowProcW, "\n");
+ ok (proc2 == DefWindowProcA, "\n");
+
+
}
START_TEST(RegisterClassEx)