mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
wbemprox/tests: Don't crash on VirtualBox.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2ba33c44b6
commit
335ad09175
1 changed files with 20 additions and 17 deletions
|
@ -1368,25 +1368,28 @@ static void test_Win32_PhysicalMemory( IWbemServices *services )
|
|||
hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count );
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
|
||||
type = 0xdeadbeef;
|
||||
VariantInit( &val );
|
||||
hr = IWbemClassObject_Get( obj, capacityW, 0, &val, &type, NULL );
|
||||
ok( hr == S_OK, "failed to get capacity %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( "capacity %s\n", wine_dbgstr_w(V_BSTR( &val )) );
|
||||
VariantClear( &val );
|
||||
if (count > 0)
|
||||
{
|
||||
type = 0xdeadbeef;
|
||||
VariantInit( &val );
|
||||
hr = IWbemClassObject_Get( obj, capacityW, 0, &val, &type, NULL );
|
||||
ok( hr == S_OK, "failed to get capacity %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( "capacity %s\n", wine_dbgstr_w(V_BSTR( &val )) );
|
||||
VariantClear( &val );
|
||||
|
||||
type = 0xdeadbeef;
|
||||
VariantInit( &val );
|
||||
hr = IWbemClassObject_Get( obj, memorytypeW, 0, &val, &type, NULL );
|
||||
ok( hr == S_OK, "failed to get memory type %08x\n", hr );
|
||||
ok( V_VT( &val ) == VT_I4, "unexpected variant type 0x%x\n", V_VT( &val ) );
|
||||
ok( type == CIM_UINT16, "unexpected type 0x%x\n", type );
|
||||
trace( "memorytype %u\n", V_I4( &val ) );
|
||||
VariantClear( &val );
|
||||
type = 0xdeadbeef;
|
||||
VariantInit( &val );
|
||||
hr = IWbemClassObject_Get( obj, memorytypeW, 0, &val, &type, NULL );
|
||||
ok( hr == S_OK, "failed to get memory type %08x\n", hr );
|
||||
ok( V_VT( &val ) == VT_I4, "unexpected variant type 0x%x\n", V_VT( &val ) );
|
||||
ok( type == CIM_UINT16, "unexpected type 0x%x\n", type );
|
||||
trace( "memorytype %u\n", V_I4( &val ) );
|
||||
VariantClear( &val );
|
||||
|
||||
IWbemClassObject_Release( obj );
|
||||
IWbemClassObject_Release( obj );
|
||||
}
|
||||
IEnumWbemClassObject_Release( result );
|
||||
SysFreeString( query );
|
||||
SysFreeString( wql );
|
||||
|
|
Loading…
Reference in a new issue