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
28bbe411
Commit
28bbe411
authored
Mar 02, 2018
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox/tests: Add a test for Win32_OperatingSystem.FreePhysicalMemory.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fe6127dc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
query.c
dlls/wbemprox/tests/query.c
+18
-8
No files found.
dlls/wbemprox/tests/query.c
View file @
28bbe411
...
@@ -1090,7 +1090,7 @@ static void test_SystemSecurity( IWbemServices *services )
...
@@ -1090,7 +1090,7 @@ static void test_SystemSecurity( IWbemServices *services )
SysFreeString
(
class
);
SysFreeString
(
class
);
}
}
static
void
test_OperatingSystem
(
IWbemServices
*
services
)
static
void
test_
Win32_
OperatingSystem
(
IWbemServices
*
services
)
{
{
static
const
WCHAR
queryW
[]
=
static
const
WCHAR
queryW
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'W'
,
'i'
,
'n'
,
'3'
,
'2'
,
'_'
,
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'W'
,
'i'
,
'n'
,
'3'
,
'2'
,
'_'
,
...
@@ -1098,6 +1098,7 @@ static void test_OperatingSystem( IWbemServices *services )
...
@@ -1098,6 +1098,7 @@ static void test_OperatingSystem( IWbemServices *services )
static
const
WCHAR
buildnumberW
[]
=
{
'B'
,
'u'
,
'i'
,
'l'
,
'd'
,
'N'
,
'u'
,
'm'
,
'b'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
buildnumberW
[]
=
{
'B'
,
'u'
,
'i'
,
'l'
,
'd'
,
'N'
,
'u'
,
'm'
,
'b'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
captionW
[]
=
{
'C'
,
'a'
,
'p'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
captionW
[]
=
{
'C'
,
'a'
,
'p'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
csdversionW
[]
=
{
'C'
,
'S'
,
'D'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
csdversionW
[]
=
{
'C'
,
'S'
,
'D'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
freephysicalmemoryW
[]
=
{
'F'
,
'r'
,
'e'
,
'e'
,
'P'
,
'h'
,
'y'
,
's'
,
'i'
,
'c'
,
'a'
,
'l'
,
'M'
,
'e'
,
'm'
,
'o'
,
'r'
,
'y'
,
0
};
static
const
WCHAR
nameW
[]
=
{
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
nameW
[]
=
{
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
osproductsuiteW
[]
=
{
'O'
,
'S'
,
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'S'
,
'u'
,
'i'
,
't'
,
'e'
,
0
};
static
const
WCHAR
osproductsuiteW
[]
=
{
'O'
,
'S'
,
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'S'
,
'u'
,
'i'
,
't'
,
'e'
,
0
};
static
const
WCHAR
ostypeW
[]
=
{
'O'
,
'S'
,
'T'
,
'y'
,
'p'
,
'e'
,
0
};
static
const
WCHAR
ostypeW
[]
=
{
'O'
,
'S'
,
'T'
,
'y'
,
'p'
,
'e'
,
0
};
...
@@ -1154,6 +1155,15 @@ static void test_OperatingSystem( IWbemServices *services )
...
@@ -1154,6 +1155,15 @@ static void test_OperatingSystem( IWbemServices *services )
type
=
0xdeadbeef
;
type
=
0xdeadbeef
;
VariantInit
(
&
val
);
VariantInit
(
&
val
);
hr
=
IWbemClassObject_Get
(
obj
,
freephysicalmemoryW
,
0
,
&
val
,
&
type
,
NULL
);
ok
(
hr
==
S_OK
,
"failed to get free physical memory size %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
val
)
==
VT_BSTR
,
"unexpected variant type 0x%x
\n
"
,
V_VT
(
&
val
)
);
ok
(
type
==
CIM_UINT64
,
"unexpected type 0x%x
\n
"
,
type
);
trace
(
"freephysicalmemory %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
val
))
);
VariantClear
(
&
val
);
type
=
0xdeadbeef
;
VariantInit
(
&
val
);
hr
=
IWbemClassObject_Get
(
obj
,
nameW
,
0
,
&
val
,
&
type
,
NULL
);
hr
=
IWbemClassObject_Get
(
obj
,
nameW
,
0
,
&
val
,
&
type
,
NULL
);
ok
(
hr
==
S_OK
,
"failed to get name %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"failed to get name %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
val
)
==
VT_BSTR
,
"unexpected variant type 0x%x
\n
"
,
V_VT
(
&
val
)
);
ok
(
V_VT
(
&
val
)
==
VT_BSTR
,
"unexpected variant type 0x%x
\n
"
,
V_VT
(
&
val
)
);
...
@@ -1239,7 +1249,7 @@ static void test_OperatingSystem( IWbemServices *services )
...
@@ -1239,7 +1249,7 @@ static void test_OperatingSystem( IWbemServices *services )
SysFreeString
(
wql
);
SysFreeString
(
wql
);
}
}
static
void
test_ComputerSystemProduct
(
IWbemServices
*
services
)
static
void
test_
Win32_
ComputerSystemProduct
(
IWbemServices
*
services
)
{
{
static
const
WCHAR
identifyingnumberW
[]
=
static
const
WCHAR
identifyingnumberW
[]
=
{
'I'
,
'd'
,
'e'
,
'n'
,
't'
,
'i'
,
'f'
,
'y'
,
'i'
,
'n'
,
'g'
,
'N'
,
'u'
,
'm'
,
'b'
,
'e'
,
'r'
,
0
};
{
'I'
,
'd'
,
'e'
,
'n'
,
't'
,
'i'
,
'f'
,
'y'
,
'i'
,
'n'
,
'g'
,
'N'
,
'u'
,
'm'
,
'b'
,
'e'
,
'r'
,
0
};
...
@@ -1333,7 +1343,7 @@ static void test_ComputerSystemProduct( IWbemServices *services )
...
@@ -1333,7 +1343,7 @@ static void test_ComputerSystemProduct( IWbemServices *services )
SysFreeString
(
wql
);
SysFreeString
(
wql
);
}
}
static
void
test_PhysicalMemory
(
IWbemServices
*
services
)
static
void
test_
Win32_
PhysicalMemory
(
IWbemServices
*
services
)
{
{
static
const
WCHAR
capacityW
[]
=
{
'C'
,
'a'
,
'p'
,
'a'
,
'c'
,
'i'
,
't'
,
'y'
,
0
};
static
const
WCHAR
capacityW
[]
=
{
'C'
,
'a'
,
'p'
,
'a'
,
'c'
,
'i'
,
't'
,
'y'
,
0
};
static
const
WCHAR
memorytypeW
[]
=
{
'M'
,
'e'
,
'm'
,
'o'
,
'r'
,
'y'
,
'T'
,
'y'
,
'p'
,
'e'
,
0
};
static
const
WCHAR
memorytypeW
[]
=
{
'M'
,
'e'
,
'm'
,
'o'
,
'r'
,
'y'
,
'T'
,
'y'
,
'p'
,
'e'
,
0
};
...
@@ -1382,7 +1392,7 @@ static void test_PhysicalMemory( IWbemServices *services )
...
@@ -1382,7 +1392,7 @@ static void test_PhysicalMemory( IWbemServices *services )
SysFreeString
(
wql
);
SysFreeString
(
wql
);
}
}
static
void
test_IP4RouteTable
(
IWbemServices
*
services
)
static
void
test_
Win32_
IP4RouteTable
(
IWbemServices
*
services
)
{
{
static
const
WCHAR
destinationW
[]
=
{
'D'
,
'e'
,
's'
,
't'
,
'i'
,
'n'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
destinationW
[]
=
{
'D'
,
'e'
,
's'
,
't'
,
'i'
,
'n'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
interfaceindexW
[]
=
{
'I'
,
'n'
,
't'
,
'e'
,
'r'
,
'f'
,
'a'
,
'c'
,
'e'
,
'I'
,
'n'
,
'd'
,
'e'
,
'x'
,
0
};
static
const
WCHAR
interfaceindexW
[]
=
{
'I'
,
'n'
,
't'
,
'e'
,
'r'
,
'f'
,
'a'
,
'c'
,
'e'
,
'I'
,
'n'
,
'd'
,
'e'
,
'x'
,
0
};
...
@@ -1668,10 +1678,10 @@ START_TEST(query)
...
@@ -1668,10 +1678,10 @@ START_TEST(query)
test_query_async
(
services
);
test_query_async
(
services
);
test_GetNames
(
services
);
test_GetNames
(
services
);
test_SystemSecurity
(
services
);
test_SystemSecurity
(
services
);
test_OperatingSystem
(
services
);
test_
Win32_
OperatingSystem
(
services
);
test_ComputerSystemProduct
(
services
);
test_
Win32_
ComputerSystemProduct
(
services
);
test_PhysicalMemory
(
services
);
test_
Win32_
PhysicalMemory
(
services
);
test_IP4RouteTable
(
services
);
test_
Win32_
IP4RouteTable
(
services
);
test_Win32_Processor
(
services
);
test_Win32_Processor
(
services
);
test_Win32_VideoController
(
services
);
test_Win32_VideoController
(
services
);
...
...
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