Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
43d04a32
Commit
43d04a32
authored
Sep 13, 2018
by
Gijs Vermeulen
Committed by
Alexandre Julliard
Sep 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
virtdisk/tests: Add GetStorageDependencyInformation tests.
Signed-off-by:
Gijs Vermeulen
<
gijsvrm@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4ecb8b7e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
0 deletions
+70
-0
configure
configure
+1
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/virtdisk/tests/Makefile.in
+4
-0
virtdisk.c
dlls/virtdisk/tests/virtdisk.c
+64
-0
No files found.
configure
View file @
43d04a32
...
...
@@ -19877,6 +19877,7 @@ wine_fn_config_makefile dlls/ver.dll16 enable_win16
wine_fn_config_makefile dlls/version enable_version
wine_fn_config_makefile dlls/version/tests enable_tests
wine_fn_config_makefile dlls/virtdisk enable_virtdisk
wine_fn_config_makefile dlls/virtdisk/tests enable_tests
wine_fn_config_makefile dlls/vmm.vxd enable_win16
wine_fn_config_makefile dlls/vnbt.vxd enable_win16
wine_fn_config_makefile dlls/vnetbios.vxd enable_win16
...
...
configure.ac
View file @
43d04a32
...
...
@@ -3733,6 +3733,7 @@ WINE_CONFIG_MAKEFILE(dlls/ver.dll16,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/version)
WINE_CONFIG_MAKEFILE(dlls/version/tests)
WINE_CONFIG_MAKEFILE(dlls/virtdisk)
WINE_CONFIG_MAKEFILE(dlls/virtdisk/tests)
WINE_CONFIG_MAKEFILE(dlls/vmm.vxd,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/vnbt.vxd,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/vnetbios.vxd,enable_win16)
...
...
dlls/virtdisk/tests/Makefile.in
0 → 100644
View file @
43d04a32
TESTDLL
=
virtdisk.dll
C_SRCS
=
\
virtdisk.c
dlls/virtdisk/tests/virtdisk.c
0 → 100644
View file @
43d04a32
/*
* Copyright 2018 Gijs Vermeulen
*
* 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 "windef.h"
#include "virtdisk.h"
#include "wine/heap.h"
#include "wine/test.h"
static
DWORD
(
WINAPI
*
pGetStorageDependencyInformation
)(
HANDLE
,
GET_STORAGE_DEPENDENCY_FLAG
,
ULONG
,
STORAGE_DEPENDENCY_INFO
*
,
ULONG
*
);
static
void
test_GetStorageDependencyInformation
(
void
)
{
DWORD
ret
;
HANDLE
handle
;
STORAGE_DEPENDENCY_INFO
*
info
;
ULONG
size
;
handle
=
CreateFileA
(
"C:"
,
0
,
0
,
NULL
,
OPEN_EXISTING
,
FILE_FLAG_BACKUP_SEMANTICS
,
0
);
ok
(
handle
!=
INVALID_HANDLE_VALUE
,
"Expected a handle
\n
"
);
size
=
sizeof
(
STORAGE_DEPENDENCY_INFO
);
info
=
heap_alloc
(
size
);
ret
=
pGetStorageDependencyInformation
(
handle
,
GET_STORAGE_DEPENDENCY_FLAG_DISK_HANDLE
,
0
,
info
,
0
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
ret
);
ret
=
pGetStorageDependencyInformation
(
handle
,
GET_STORAGE_DEPENDENCY_FLAG_DISK_HANDLE
,
size
,
NULL
,
0
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
ret
);
heap_free
(
info
);
CloseHandle
(
handle
);
}
START_TEST
(
virtdisk
)
{
HMODULE
module
=
LoadLibraryA
(
"virtdisk.dll"
);
if
(
!
module
)
{
win_skip
(
"virtdisk.dll not installed
\n
"
);
return
;
}
pGetStorageDependencyInformation
=
(
void
*
)
GetProcAddress
(
module
,
"GetStorageDependencyInformation"
);
if
(
pGetStorageDependencyInformation
)
test_GetStorageDependencyInformation
();
else
win_skip
(
"GetStorageDependencyInformation is not available
\n
"
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment