Skip to content

Commit 2fc9d3c

Browse files
[COMCTL32_WINETEST] Sync to Wine-11.11
1 parent 636e0ff commit 2fc9d3c

35 files changed

Lines changed: 9666 additions & 1866 deletions

modules/rostests/winetests/comctl32/CMakeLists.txt

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
remove_definitions(-D_WIN32_WINNT=0x502 -D_WIN32_IE=0x600)
33

4-
add_definitions(-D__ROS_LONG64__)
54
add_definitions(-DUSE_WINE_TODOS -DWINETEST_USE_DBGSTR_LONGLONG)
5+
include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/wine)
66

77
list(APPEND SOURCE
88
animate.c
@@ -49,14 +49,22 @@ if(MSVC AND ARCH STREQUAL "amd64")
4949
endif()
5050

5151
if(MSVC)
52-
# warning C4045: 'large_truncated_80_w': array bounds overflow
53-
target_compile_options(comctl32_winetest PRIVATE /wd4045)
52+
# warning C4045: 'large_truncated_80_w': array bounds overflow
53+
# warning C4047: 'function': 'type' differs in levels of indirection from 'type'
54+
# warning C4024: different types for formal and actual parameter
55+
target_compile_options(comctl32_winetest PRIVATE /wd4045 /wd4047 /wd4024)
56+
endif()
57+
58+
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR
59+
CMAKE_C_COMPILER_ID STREQUAL "Clang")
60+
target_compile_options(comctl32_winetest PRIVATE -Wno-int-conversion -Wno-old-style-declaration)
5461
endif()
5562

5663
target_compile_options(comctl32_winetest PRIVATE $<$<NOT:$<C_COMPILER_ID:MSVC>>:-Wno-format>)
5764

5865
set_module_type(comctl32_winetest win32cui)
59-
add_importlibs(comctl32_winetest comctl32 ole32 user32 gdi32 advapi32 msvcrt kernel32)
66+
add_importlibs(comctl32_winetest comctl32 imm32 uxtheme ole32 oleacc oleaut32 user32 gdi32 advapi32 msvcrt kernel32)
67+
target_link_libraries(comctl32_winetest uuid oldnames)
6068

6169
if(MSVC)
6270
add_importlibs(comctl32_winetest ntdll)

modules/rostests/winetests/comctl32/animate.c

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232

3333
static HWND hAnimateParentWnd, hAnimateWnd;
3434
static const char animateTestClass[] = "AnimateTestClass";
35-
static WNDPROC animate_wndproc;
3635
static HANDLE shell32;
3736

3837
/* try to make sure pending X events have been processed before continuing */
@@ -100,7 +99,7 @@ static void create_animate(DWORD parent_style, DWORD animate_style)
10099
hAnimateWnd = CreateWindowExA(0, ANIMATE_CLASSA, NULL, WS_CHILD | WS_VISIBLE | animate_style,
101100
0, 0, rect.right, rect.bottom, hAnimateParentWnd, NULL, shell32, 0);
102101
ok(hAnimateWnd != NULL, "failed to create parent wnd\n");
103-
animate_wndproc = (WNDPROC)SetWindowLongPtrA(hAnimateWnd, GWLP_WNDPROC, 0);
102+
SetWindowLongPtrA(hAnimateWnd, GWLP_WNDPROC, 0);
104103

105104
ShowWindow(hAnimateParentWnd, SW_SHOWNORMAL);
106105
ok(GetUpdateRect(hAnimateParentWnd, NULL, FALSE), "GetUpdateRect: There should be a region that needs to be updated\n");
@@ -133,23 +132,40 @@ static void test_play(void)
133132

134133
create_animate(0, 0);
135134
SetLastError(0xdeadbeef);
136-
res = SendMessageA(hAnimateWnd, ACM_OPENA,(WPARAM)shell32, (LPARAM)MAKEINTRESOURCE(INVALID_AVI_INDEX));
135+
res = SendMessageA(hAnimateWnd, ACM_OPENA,(WPARAM)shell32, MAKEINTRESOURCE(INVALID_AVI_INDEX));
137136
err = GetLastError();
138137
ok(res == 0, "Invalid video should have failed\n");
139-
ok(err == ERROR_RESOURCE_NAME_NOT_FOUND, "Expected 1814, got %u\n", err);
138+
ok(err == ERROR_RESOURCE_NAME_NOT_FOUND, "Expected 1814, got %lu\n", err);
140139

141140
SetLastError(0xdeadbeef);
142141
res = SendMessageA(hAnimateWnd, ACM_PLAY, (WPARAM) -1, MAKELONG(0, -1));
143142
err = GetLastError();
144143
ok(res == 0, "Play should have failed\n");
145-
ok(err == 0xdeadbeef, "Expected 0xdeadbeef, got %u\n", err);
144+
ok(err == 0xdeadbeef, "Expected 0xdeadbeef, got %lu\n", err);
146145
destroy_animate();
147146

148147
create_animate(0, 0);
149-
res = SendMessageA(hAnimateWnd, ACM_OPENA,(WPARAM)shell32, (LPARAM)MAKEINTRESOURCE(SEARCHING_AVI_INDEX));
148+
res = SendMessageA(hAnimateWnd, ACM_OPENA,(WPARAM)shell32, MAKEINTRESOURCE(SEARCHING_AVI_INDEX));
150149
ok(res != 0, "Load AVI resource failed\n");
151150
res = SendMessageA(hAnimateWnd, ACM_PLAY, (WPARAM) -1, MAKELONG(0, -1));
152151
ok(res != 0, "Play should have worked\n");
152+
/* Test ACM_OPEN after playing an animation */
153+
res = SendMessageA(hAnimateWnd, ACM_OPENA, 0, 0);
154+
ok(res == 0, "ACM_OPENA with a NULL lparam while playing should return 0\n");
155+
destroy_animate();
156+
157+
/* Test ACM_OPEN after opening an animation */
158+
create_animate(0, 0);
159+
res = SendMessageA(hAnimateWnd, ACM_OPENA, (WPARAM)shell32, MAKEINTRESOURCE(SEARCHING_AVI_INDEX));
160+
ok(res != 0, "Load AVI resource failed\n");
161+
res = SendMessageA(hAnimateWnd, ACM_OPENA, 0, 0);
162+
ok(res == 0, "ACM_OPENA with a NULL lparam should return 0\n");
163+
destroy_animate();
164+
165+
/* Test ACM_OPEN without opening an animation */
166+
create_animate(0, 0);
167+
res = SendMessageA(hAnimateWnd, ACM_OPENA, 0, 0);
168+
ok(res == 0, "ACM_OPENA with a NULL lparam should return 0\n");
153169
destroy_animate();
154170
}
155171

58 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)