mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
add some wlanapi tests
svn path=/trunk/; revision=40057
This commit is contained in:
parent
151e1c47c1
commit
5c6d424c26
4 changed files with 115 additions and 0 deletions
|
@ -232,6 +232,9 @@
|
||||||
<directory name="wintrust">
|
<directory name="wintrust">
|
||||||
<xi:include href="wintrust/wintrust.rbuild" />
|
<xi:include href="wintrust/wintrust.rbuild" />
|
||||||
</directory>
|
</directory>
|
||||||
|
<directory name="wlanapi">
|
||||||
|
<xi:include href="wlanapi/wlanapi.rbuild" />
|
||||||
|
</directory>
|
||||||
<directory name="wldap32">
|
<directory name="wldap32">
|
||||||
<xi:include href="wldap32/wldap32.rbuild" />
|
<xi:include href="wldap32/wldap32.rbuild" />
|
||||||
</directory>
|
</directory>
|
||||||
|
|
15
rostests/winetests/wlanapi/testlist.c
Normal file
15
rostests/winetests/wlanapi/testlist.c
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
/* Automatically generated file; DO NOT EDIT!! */
|
||||||
|
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
#define STANDALONE
|
||||||
|
#include "wine/test.h"
|
||||||
|
|
||||||
|
extern void func_wlanapi(void);
|
||||||
|
|
||||||
|
const struct test winetest_testlist[] =
|
||||||
|
{
|
||||||
|
{ "wlanapi", func_wlanapi },
|
||||||
|
{ 0, 0 }
|
||||||
|
};
|
82
rostests/winetests/wlanapi/wlanapi.c
Normal file
82
rostests/winetests/wlanapi/wlanapi.c
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
/*
|
||||||
|
* Wlanapi - tests
|
||||||
|
*
|
||||||
|
* Copyright 2009 Christoph von Wittich
|
||||||
|
*
|
||||||
|
* 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 <stdarg.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "windef.h"
|
||||||
|
#include "winbase.h"
|
||||||
|
#include "wlanapi.h"
|
||||||
|
|
||||||
|
#include "wine/test.h"
|
||||||
|
|
||||||
|
static void WlanOpenHandle_test(void)
|
||||||
|
{
|
||||||
|
DWORD ret;
|
||||||
|
DWORD dwNegotiatedVersion;
|
||||||
|
HANDLE hClientHandle;
|
||||||
|
|
||||||
|
/* correct call to determine if WlanSvc is running */
|
||||||
|
ret = WlanOpenHandle(1, NULL, &dwNegotiatedVersion, &hClientHandle);
|
||||||
|
if (ret == ERROR_SERVICE_EXISTS)
|
||||||
|
{
|
||||||
|
skip("Skipping wlanapi tests, WlanSvc is not running\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ok(ret == ERROR_SUCCESS, "WlanOpenHandle failed, error %d\n", ret);
|
||||||
|
WlanCloseHandle(hClientHandle, NULL);
|
||||||
|
|
||||||
|
/* invalid pdwNegotiatedVersion */
|
||||||
|
ret = WlanOpenHandle(1, NULL, NULL, &hClientHandle);
|
||||||
|
ok(ret == ERROR_INVALID_PARAMETER, "expected failure\n");
|
||||||
|
|
||||||
|
/* invalid hClientHandle */
|
||||||
|
ret = WlanOpenHandle(1, NULL, &dwNegotiatedVersion, NULL);
|
||||||
|
ok(ret == ERROR_INVALID_PARAMETER, "expected failure\n");
|
||||||
|
|
||||||
|
/* invalid pReserved */
|
||||||
|
ret = WlanOpenHandle(1, (PVOID) 1, &dwNegotiatedVersion, &hClientHandle);
|
||||||
|
ok(ret == ERROR_INVALID_PARAMETER, "expected failure\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void WlanCloseHandle_test(void)
|
||||||
|
{
|
||||||
|
DWORD ret;
|
||||||
|
HANDLE hClientHandle = (HANDLE) 0xdeadbeef;
|
||||||
|
|
||||||
|
/* invalid pReserved */
|
||||||
|
ret = WlanCloseHandle(hClientHandle, (PVOID) 1);
|
||||||
|
ok(ret == ERROR_INVALID_PARAMETER, "expected failure\n");
|
||||||
|
|
||||||
|
/* invalid hClientHandle */
|
||||||
|
ret = WlanCloseHandle(NULL, NULL);
|
||||||
|
ok(ret == ERROR_INVALID_PARAMETER, "expected failure\n");
|
||||||
|
|
||||||
|
/* invalid hClientHandle */
|
||||||
|
ret = WlanCloseHandle(hClientHandle, NULL);
|
||||||
|
ok(ret == ERROR_INVALID_HANDLE, "expected failure\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
START_TEST(wlanapi)
|
||||||
|
{
|
||||||
|
WlanOpenHandle_test();
|
||||||
|
WlanCloseHandle_test();
|
||||||
|
}
|
15
rostests/winetests/wlanapi/wlanapi.rbuild
Normal file
15
rostests/winetests/wlanapi/wlanapi.rbuild
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
|
||||||
|
<group>
|
||||||
|
<module name="wlanapi_winetest" type="win32cui" installbase="bin" installname="wlanapi_winetest.exe" allowwarnings="true">
|
||||||
|
<compilerflag compiler="cc">-Wno-format</compilerflag>
|
||||||
|
<include base="wininet_winetest">.</include>
|
||||||
|
<define name="__ROS_LONG64__" />
|
||||||
|
<library>wine</library>
|
||||||
|
<library>wlanapi</library>
|
||||||
|
<library>kernel32</library>
|
||||||
|
<library>ntdll</library>
|
||||||
|
<file>wlanapi.c</file>
|
||||||
|
<file>testlist.c</file>
|
||||||
|
</module>
|
||||||
|
</group>
|
Loading…
Reference in a new issue