mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 23:22:57 +00:00
[NETAPI32_APITEST]
Add a simple API Test for netapi32.dll, only covering DsRoleGetPrimaryDomainInformation so far. It succeeds in ReactOS, but outputs a heap error in the debug log. In real world applications, this later leads to a heap assertion failure. svn path=/trunk/; revision=75208
This commit is contained in:
parent
1525fa31fc
commit
e5654cce9f
4 changed files with 58 additions and 0 deletions
|
@ -20,6 +20,7 @@ endif()
|
||||||
add_subdirectory(localspl)
|
add_subdirectory(localspl)
|
||||||
add_subdirectory(msgina)
|
add_subdirectory(msgina)
|
||||||
add_subdirectory(msvcrt)
|
add_subdirectory(msvcrt)
|
||||||
|
add_subdirectory(netapi32)
|
||||||
add_subdirectory(netshell)
|
add_subdirectory(netshell)
|
||||||
add_subdirectory(ntdll)
|
add_subdirectory(ntdll)
|
||||||
add_subdirectory(ole32)
|
add_subdirectory(ole32)
|
||||||
|
|
10
rostests/apitests/netapi32/CMakeLists.txt
Normal file
10
rostests/apitests/netapi32/CMakeLists.txt
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
|
||||||
|
list(APPEND SOURCE
|
||||||
|
DsRoleGetPrimaryDomainInformation.c
|
||||||
|
testlist.c)
|
||||||
|
|
||||||
|
add_executable(netapi32_apitest ${SOURCE})
|
||||||
|
target_link_libraries(netapi32_apitest wine ${PSEH_LIB})
|
||||||
|
set_module_type(netapi32_apitest win32cui)
|
||||||
|
add_importlibs(netapi32_apitest netapi32 msvcrt kernel32 ntdll)
|
||||||
|
add_rostests_file(TARGET netapi32_apitest)
|
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
* PROJECT: ReactOS netapi32.dll API Tests
|
||||||
|
* LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation
|
||||||
|
* PURPOSE: Tests for DsRoleGetPrimaryDomainInformation
|
||||||
|
* COPYRIGHT: Copyright 2017 Colin Finck <colin@reactos.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <apitest.h>
|
||||||
|
|
||||||
|
#define WIN32_NO_STATUS
|
||||||
|
#include <windef.h>
|
||||||
|
#include <winbase.h>
|
||||||
|
#include <dsrole.h>
|
||||||
|
|
||||||
|
START_TEST(DsRoleGetPrimaryDomainInformation)
|
||||||
|
{
|
||||||
|
DWORD dwErrorCode;
|
||||||
|
PDSROLE_PRIMARY_DOMAIN_INFO_BASIC pInfo = NULL;
|
||||||
|
|
||||||
|
// Get information about the domain membership of this computer.
|
||||||
|
dwErrorCode = DsRoleGetPrimaryDomainInformation(NULL, DsRolePrimaryDomainInfoBasic, (PBYTE*)&pInfo);
|
||||||
|
ok(dwErrorCode == ERROR_SUCCESS, "DsRoleGetPrimaryDomainInformation returns %lu!\n", dwErrorCode);
|
||||||
|
ok(pInfo->MachineRole >= DsRole_RoleStandaloneWorkstation && pInfo->MachineRole <= DsRole_RolePrimaryDomainController, "pInfo->MachineRole is %lu!\n", pInfo->MachineRole);
|
||||||
|
|
||||||
|
if (pInfo)
|
||||||
|
DsRoleFreeMemory(pInfo);
|
||||||
|
}
|
20
rostests/apitests/netapi32/testlist.c
Normal file
20
rostests/apitests/netapi32/testlist.c
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* PROJECT: ReactOS netapi32.dll API Tests
|
||||||
|
* LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation
|
||||||
|
* PURPOSE: Test list
|
||||||
|
* COPYRIGHT: Copyright 2017 Colin Finck <colin@reactos.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define __ROS_LONG64__
|
||||||
|
|
||||||
|
#define STANDALONE
|
||||||
|
#include <apitest.h>
|
||||||
|
|
||||||
|
extern void func_DsRoleGetPrimaryDomainInformation(void);
|
||||||
|
|
||||||
|
const struct test winetest_testlist[] =
|
||||||
|
{
|
||||||
|
{ "DsRoleGetPrimaryDomainInformation", func_DsRoleGetPrimaryDomainInformation },
|
||||||
|
|
||||||
|
{ 0, 0 }
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue