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
d60aead1
Commit
d60aead1
authored
Jul 25, 2017
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmloader/tests: Add more SetSearchDirectory() tests.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2e3a8a6f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
loader.c
dlls/dmloader/tests/loader.c
+26
-0
No files found.
dlls/dmloader/tests/loader.c
View file @
d60aead1
...
...
@@ -49,6 +49,7 @@ static void test_directory(void)
HRESULT
hr
;
WCHAR
con
[]
=
{
'c'
,
'o'
,
'n'
,
0
};
WCHAR
path
[
MAX_PATH
];
WCHAR
empty
[]
=
{
0
};
WCHAR
invalid_path
[]
=
{
'/'
,
'i'
,
'n'
,
'v'
,
'a'
,
'l'
,
'i'
,
'd'
,
' '
,
'p'
,
'a'
,
't'
,
'h'
,
0
};
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicLoader
,
NULL
,
CLSCTX_INPROC
,
&
IID_IDirectMusicLoader8
,
...
...
@@ -60,9 +61,16 @@ static void test_directory(void)
ok
(
hr
==
S_FALSE
,
"ScanDirectory for
\"
con
\"
files failed with %#x
\n
"
,
hr
);
/* SetSearchDirectory with invalid path */
hr
=
IDirectMusicLoader_SetSearchDirectory
(
loader
,
&
GUID_DirectMusicAllTypes
,
NULL
,
0
);
ok
(
hr
==
E_POINTER
,
"SetSearchDirectory failed with %#x
\n
"
,
hr
);
hr
=
IDirectMusicLoader_SetSearchDirectory
(
loader
,
&
GUID_DirectMusicAllTypes
,
invalid_path
,
0
);
ok
(
hr
==
DMUS_E_LOADER_BADPATH
,
"SetSearchDirectory failed with %#x
\n
"
,
hr
);
/* SetSearchDirectory with the current directory */
GetCurrentDirectoryW
(
ARRAY_SIZE
(
path
),
path
);
hr
=
IDirectMusicLoader_SetSearchDirectory
(
loader
,
&
GUID_DirectMusicAllTypes
,
path
,
0
);
ok
(
hr
==
S_OK
,
"SetSearchDirectory failed with %#x
\n
"
,
hr
);
/* Two consecutive SetSearchDirectory with the same path */
GetTempPathW
(
ARRAY_SIZE
(
path
),
path
);
hr
=
IDirectMusicLoader_SetSearchDirectory
(
loader
,
&
GUID_DirectMusicAllTypes
,
path
,
0
);
...
...
@@ -74,11 +82,29 @@ static void test_directory(void)
hr
=
IDirectMusicLoader_SetSearchDirectory
(
loader
,
&
CLSID_DirectSoundWave
,
path
,
0
);
ok
(
hr
==
S_FALSE
,
"Second SetSearchDirectory failed with %#x
\n
"
,
hr
);
/* Invalid GUIDs */
if
(
0
)
IDirectMusicLoader_SetSearchDirectory
(
loader
,
NULL
,
path
,
0
);
/* Crashes on Windows */
hr
=
IDirectMusicLoader_SetSearchDirectory
(
loader
,
&
IID_IDirectMusicLoader8
,
path
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"SetSearchDirectory failed with %#x
\n
"
,
hr
);
/* NULL extension is not an error */
hr
=
IDirectMusicLoader_ScanDirectory
(
loader
,
&
CLSID_DirectSoundWave
,
NULL
,
NULL
);
ok
(
hr
==
S_FALSE
,
"ScanDirectory for
\"
wav
\"
files failed, received %#x
\n
"
,
hr
);
IDirectMusicLoader_Release
(
loader
);
/* An empty path is a valid path */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicLoader
,
NULL
,
CLSCTX_INPROC
,
&
IID_IDirectMusicLoader8
,
(
void
**
)
&
loader
);
ok
(
hr
==
S_OK
,
"Couldn't create Loader %#x
\n
"
,
hr
);
hr
=
IDirectMusicLoader_SetSearchDirectory
(
loader
,
&
GUID_DirectMusicAllTypes
,
empty
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"SetSearchDirectory failed with %#x
\n
"
,
hr
);
hr
=
IDirectMusicLoader_SetSearchDirectory
(
loader
,
&
GUID_DirectMusicAllTypes
,
empty
,
0
);
ok
(
hr
==
S_FALSE
,
"SetSearchDirectory failed with %#x
\n
"
,
hr
);
hr
=
IDirectMusicLoader_ScanDirectory
(
loader
,
&
CLSID_DirectMusicContainer
,
con
,
NULL
);
ok
(
hr
==
S_FALSE
,
"ScanDirectory for
\"
con
\"
files failed with %#x
\n
"
,
hr
);
IDirectMusicLoader_Release
(
loader
);
}
static
void
test_release_object
(
void
)
...
...
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