wlanapi/tests: Add test structure.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Bruno Jesus 2017-01-30 04:59:39 -02:00 committed by Alexandre Julliard
parent f9d14b18b1
commit 3052c70068
5 changed files with 50 additions and 3 deletions

3
configure vendored
View File

@ -18429,7 +18429,8 @@ wine_fn_config_dll wintab32 enable_wintab32 implib
wine_fn_config_test dlls/wintab32/tests wintab32_test wine_fn_config_test dlls/wintab32/tests wintab32_test
wine_fn_config_dll wintrust enable_wintrust implib wine_fn_config_dll wintrust enable_wintrust implib
wine_fn_config_test dlls/wintrust/tests wintrust_test wine_fn_config_test dlls/wintrust/tests wintrust_test
wine_fn_config_dll wlanapi enable_wlanapi wine_fn_config_dll wlanapi enable_wlanapi implib
wine_fn_config_test dlls/wlanapi/tests wlanapi_test
wine_fn_config_dll wldap32 enable_wldap32 clean,implib wine_fn_config_dll wldap32 enable_wldap32 clean,implib
wine_fn_config_test dlls/wldap32/tests wldap32_test wine_fn_config_test dlls/wldap32/tests wldap32_test
wine_fn_config_dll wmasf enable_wmasf wine_fn_config_dll wmasf enable_wmasf

View File

@ -3488,7 +3488,8 @@ WINE_CONFIG_DLL(wintab32,,[implib])
WINE_CONFIG_TEST(dlls/wintab32/tests) WINE_CONFIG_TEST(dlls/wintab32/tests)
WINE_CONFIG_DLL(wintrust,,[implib]) WINE_CONFIG_DLL(wintrust,,[implib])
WINE_CONFIG_TEST(dlls/wintrust/tests) WINE_CONFIG_TEST(dlls/wintrust/tests)
WINE_CONFIG_DLL(wlanapi) WINE_CONFIG_DLL(wlanapi,,[implib])
WINE_CONFIG_TEST(dlls/wlanapi/tests)
WINE_CONFIG_DLL(wldap32,,[clean,implib]) WINE_CONFIG_DLL(wldap32,,[clean,implib])
WINE_CONFIG_TEST(dlls/wldap32/tests) WINE_CONFIG_TEST(dlls/wldap32/tests)
WINE_CONFIG_DLL(wmasf) WINE_CONFIG_DLL(wmasf)

View File

@ -1,4 +1,5 @@
MODULE = wlanapi.dll MODULE = wlanapi.dll
IMPORTLIB = wlanapi
C_SRCS = \ C_SRCS = \
main.c main.c

View File

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

View File

@ -0,0 +1,39 @@
/*
* Unit test suite for wlanapi functions
*
* Copyright 2017 Bruno Jesus
*
* 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
*/
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <wlanapi.h>
#include "wine/test.h"
START_TEST(wlanapi)
{
HANDLE handle;
DWORD neg_version;
/* Windows checks the service before validating the client version so this
* call will always result in error, no need to free the handle. */
if (WlanOpenHandle(0, NULL, &neg_version, &handle) == ERROR_SERVICE_NOT_ACTIVE)
{
win_skip("No wireless service running\n");
return;
}
}