win32u/tests: Add NtUserCloseWindowStation test.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2021-10-12 15:33:30 +02:00 committed by Alexandre Julliard
parent d7ae3591ec
commit c05704c713
4 changed files with 49 additions and 0 deletions

1
configure vendored
View File

@ -20773,6 +20773,7 @@ wine_fn_config_makefile dlls/wiaservc/tests enable_tests
wine_fn_config_makefile dlls/wimgapi enable_wimgapi
wine_fn_config_makefile dlls/win32s16.dll16 enable_win16
wine_fn_config_makefile dlls/win32u enable_win32u
wine_fn_config_makefile dlls/win32u/tests enable_tests
wine_fn_config_makefile dlls/win87em.dll16 enable_win16
wine_fn_config_makefile dlls/winaspi.dll16 enable_win16
wine_fn_config_makefile dlls/windebug.dll16 enable_win16

View File

@ -3659,6 +3659,7 @@ WINE_CONFIG_MAKEFILE(dlls/wiaservc/tests)
WINE_CONFIG_MAKEFILE(dlls/wimgapi)
WINE_CONFIG_MAKEFILE(dlls/win32s16.dll16,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/win32u)
WINE_CONFIG_MAKEFILE(dlls/win32u/tests)
WINE_CONFIG_MAKEFILE(dlls/win87em.dll16,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/winaspi.dll16,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/windebug.dll16,enable_win16)

View File

@ -0,0 +1,5 @@
TESTDLL = win32u.dll
IMPORTS = user32 win32u
C_SRCS = \
win32u.c

View File

@ -0,0 +1,42 @@
/*
* Copyright 2021 Jacek Caban for CodeWeavers
*
* 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 "winbase.h"
#include "ntuser.h"
static void test_NtUserCloseWindowStation(void)
{
BOOL ret;
SetLastError( 0xdeadbeef );
ret = NtUserCloseWindowStation( 0 );
ok( !ret && GetLastError() == ERROR_INVALID_HANDLE,
"NtUserCloseWindowStation returned %x %u\n", ret, GetLastError() );
}
START_TEST(win32u)
{
/* native win32u.dll fails if user32 is not loaded, so make sure it's fully initialized */
GetDesktopWindow();
test_NtUserCloseWindowStation();
}