Needed by ProSelect.
-- v2: icmui/tests: Add some SetupColorMatchingW() tests. icmui: Add SetupColorMatchingW() stub. icmui: Add stub DLL.
From: Mohamad Al-Jaf mohamadaljaf@gmail.com
Needed by ProSelect. --- configure.ac | 1 + dlls/icmui/Makefile.in | 1 + dlls/icmui/icmui.spec | 2 ++ 3 files changed, 4 insertions(+) create mode 100644 dlls/icmui/Makefile.in create mode 100644 dlls/icmui/icmui.spec
diff --git a/configure.ac b/configure.ac index 94260d7ae7b..bc0030cf688 100644 --- a/configure.ac +++ b/configure.ac @@ -2703,6 +2703,7 @@ WINE_CONFIG_MAKEFILE(dlls/hvsimanagementapi/tests) WINE_CONFIG_MAKEFILE(dlls/ia2comproxy) WINE_CONFIG_MAKEFILE(dlls/iccvid) WINE_CONFIG_MAKEFILE(dlls/icmp) +WINE_CONFIG_MAKEFILE(dlls/icmui) WINE_CONFIG_MAKEFILE(dlls/ieframe) WINE_CONFIG_MAKEFILE(dlls/ieframe/tests) WINE_CONFIG_MAKEFILE(dlls/ieproxy) diff --git a/dlls/icmui/Makefile.in b/dlls/icmui/Makefile.in new file mode 100644 index 00000000000..a8814fd2439 --- /dev/null +++ b/dlls/icmui/Makefile.in @@ -0,0 +1 @@ +MODULE = icmui.dll diff --git a/dlls/icmui/icmui.spec b/dlls/icmui/icmui.spec new file mode 100644 index 00000000000..9a03db4d788 --- /dev/null +++ b/dlls/icmui/icmui.spec @@ -0,0 +1,2 @@ +@ stub SetupColorMatchingA +@ stub SetupColorMatchingW
From: Mohamad Al-Jaf mohamadaljaf@gmail.com
Needed by ProSelect. --- dlls/icmui/Makefile.in | 3 +++ dlls/icmui/icmui.c | 31 +++++++++++++++++++++++++++++++ dlls/icmui/icmui.spec | 2 +- 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 dlls/icmui/icmui.c
diff --git a/dlls/icmui/Makefile.in b/dlls/icmui/Makefile.in index a8814fd2439..f61d4f70788 100644 --- a/dlls/icmui/Makefile.in +++ b/dlls/icmui/Makefile.in @@ -1 +1,4 @@ MODULE = icmui.dll + +SOURCES = \ + icmui.c diff --git a/dlls/icmui/icmui.c b/dlls/icmui/icmui.c new file mode 100644 index 00000000000..2572844cca7 --- /dev/null +++ b/dlls/icmui/icmui.c @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 Mohamad Al-Jaf + * + * 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 "wine/debug.h" +#include "wingdi.h" +#include "winuser.h" +#include "icm.h" + +WINE_DEFAULT_DEBUG_CHANNEL(icmui); + +BOOL WINAPI SetupColorMatchingW( COLORMATCHSETUPW *cms ) +{ + FIXME( "cms %p - stub!\n", cms ); + SetLastError( ERROR_INVALID_PARAMETER ); + return FALSE; +} diff --git a/dlls/icmui/icmui.spec b/dlls/icmui/icmui.spec index 9a03db4d788..1004457db97 100644 --- a/dlls/icmui/icmui.spec +++ b/dlls/icmui/icmui.spec @@ -1,2 +1,2 @@ @ stub SetupColorMatchingA -@ stub SetupColorMatchingW +@ stdcall SetupColorMatchingW(ptr)
From: Mohamad Al-Jaf mohamadaljaf@gmail.com
--- configure.ac | 1 + dlls/icmui/Makefile.in | 3 ++- dlls/icmui/tests/Makefile.in | 5 +++++ dlls/icmui/tests/icmui.c | 43 ++++++++++++++++++++++++++++++++++++ 4 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 dlls/icmui/tests/Makefile.in create mode 100644 dlls/icmui/tests/icmui.c
diff --git a/configure.ac b/configure.ac index bc0030cf688..ec94b754a21 100644 --- a/configure.ac +++ b/configure.ac @@ -2704,6 +2704,7 @@ WINE_CONFIG_MAKEFILE(dlls/ia2comproxy) WINE_CONFIG_MAKEFILE(dlls/iccvid) WINE_CONFIG_MAKEFILE(dlls/icmp) WINE_CONFIG_MAKEFILE(dlls/icmui) +WINE_CONFIG_MAKEFILE(dlls/icmui/tests) WINE_CONFIG_MAKEFILE(dlls/ieframe) WINE_CONFIG_MAKEFILE(dlls/ieframe/tests) WINE_CONFIG_MAKEFILE(dlls/ieproxy) diff --git a/dlls/icmui/Makefile.in b/dlls/icmui/Makefile.in index f61d4f70788..b6ca4f507f7 100644 --- a/dlls/icmui/Makefile.in +++ b/dlls/icmui/Makefile.in @@ -1,4 +1,5 @@ -MODULE = icmui.dll +MODULE = icmui.dll +IMPORTLIB = icmui
SOURCES = \ icmui.c diff --git a/dlls/icmui/tests/Makefile.in b/dlls/icmui/tests/Makefile.in new file mode 100644 index 00000000000..4f5c7e77898 --- /dev/null +++ b/dlls/icmui/tests/Makefile.in @@ -0,0 +1,5 @@ +TESTDLL = icmui.dll +IMPORTS = icmui + +SOURCES = \ + icmui.c diff --git a/dlls/icmui/tests/icmui.c b/dlls/icmui/tests/icmui.c new file mode 100644 index 00000000000..2a323a0fc6a --- /dev/null +++ b/dlls/icmui/tests/icmui.c @@ -0,0 +1,43 @@ +/* + * Unit test suite for Microsoft Color Matching System User Interface + * + * Copyright (C) 2024 Mohamad Al-Jaf + * + * 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 "wine/test.h" +#include "wingdi.h" +#include "winuser.h" +#include "icm.h" + +static void test_SetupColorMatchingW(void) +{ + COLORMATCHSETUPW cms; + BOOL ret; + + memset( &cms, 0, sizeof( cms ) ); + ret = TRUE; + SetLastError( 0xdeadbeef ); + ret = SetupColorMatchingW( &cms ); + ok( ret == FALSE, "got ret %d\n", ret ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError() returned %ld\n", GetLastError() ); +} + +START_TEST(icmui) +{ + test_SetupColorMatchingW(); +}
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=149800
Your paranoid android.
=== debian11b (64 bit WoW report) ===
user32: win.c:4070: Test failed: Expected active window 0000000003270166, got 0000000000000000. win.c:4071: Test failed: Expected focus window 0000000003270166, got 0000000000000000.
**v2** - Add a basic test - Correct `SetLastError()`
`SetupColorMatchingW(NULL)` crashes under Windows.
Hans Leidekker (@hans) commented about dlls/icmui/tests/icmui.c:
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
+#include "wine/test.h" +#include "wingdi.h" +#include "winuser.h" +#include "icm.h"
+static void test_SetupColorMatchingW(void) +{
- COLORMATCHSETUPW cms;
- BOOL ret;
- memset( &cms, 0, sizeof( cms ) );
- ret = TRUE;
This assignment is redundant. Otherwise this looks good.
This merge request was approved by Hans Leidekker.