Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
790109da
Commit
790109da
authored
Jul 03, 2023
by
Mohamad Al-Jaf
Committed by
Alexandre Julliard
Jul 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.networking.hostname/tests: Add IHostNameFactory::CreateHostName() tests.
parent
e814a2b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
1 deletion
+26
-1
hostname.c
dlls/windows.networking.hostname/tests/hostname.c
+26
-1
No files found.
dlls/windows.networking.hostname/tests/hostname.c
View file @
790109da
...
...
@@ -48,10 +48,13 @@ static void check_interface_( unsigned int line, void *obj, const IID *iid )
static
void
test_HostnameStatics
(
void
)
{
static
const
WCHAR
*
hostname_statics_name
=
L"Windows.Networking.HostName"
;
static
const
WCHAR
*
ip
=
L"192.168.0.0"
;
IHostNameFactory
*
hostnamefactory
;
IActivationFactory
*
factory
;
HSTRING
str
;
HSTRING
str
,
rawname
;
IHostName
*
hostname
;
HRESULT
hr
;
INT32
res
;
LONG
ref
;
hr
=
WindowsCreateString
(
hostname_statics_name
,
wcslen
(
hostname_statics_name
),
&
str
);
...
...
@@ -72,7 +75,29 @@ static void test_HostnameStatics(void)
hr
=
IActivationFactory_QueryInterface
(
factory
,
&
IID_IHostNameFactory
,
(
void
**
)
&
hostnamefactory
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
WindowsCreateString
(
ip
,
wcslen
(
ip
),
&
str
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
IHostNameFactory_CreateHostName
(
hostnamefactory
,
NULL
,
&
hostname
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
IHostNameFactory_CreateHostName
(
hostnamefactory
,
str
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
IHostNameFactory_CreateHostName
(
hostnamefactory
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
IHostNameFactory_CreateHostName
(
hostnamefactory
,
str
,
&
hostname
);
todo_wine
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
hostname
!=
NULL
,
"got NULL hostname %p.
\n
"
,
hostname
);
hr
=
IHostName_get_RawName
(
hostname
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
IHostName_get_RawName
(
hostname
,
&
rawname
);
todo_wine
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
WindowsCompareStringOrdinal
(
str
,
rawname
,
&
res
);
todo_wine
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!
res
,
"got unexpected string %s.
\n
"
,
debugstr_hstring
(
rawname
)
);
WindowsDeleteString
(
str
);
WindowsDeleteString
(
rawname
);
ref
=
IHostNameFactory_Release
(
hostnamefactory
);
ok
(
ref
==
2
,
"got ref %ld.
\n
"
,
ref
);
ref
=
IActivationFactory_Release
(
factory
);
...
...
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