1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

windows.applicationmodel/tests: Add IStorageItem::get_Path() tests.

This commit is contained in:
Mohamad Al-Jaf 2023-08-11 01:06:32 -04:00 committed by Alexandre Julliard
parent 8d3ef2bb85
commit a7fa496b4b
2 changed files with 18 additions and 2 deletions

View file

@ -1,5 +1,5 @@
TESTDLL = windows.applicationmodel.dll
IMPORTS = combase advapi32
IMPORTS = combase advapi32 kernelbase
application_EXTRADLLFLAGS = -mconsole

View file

@ -28,6 +28,7 @@
#include "winbase.h"
#include "initguid.h"
#include "winstring.h"
#include "pathcch.h"
#include "roapi.h"
@ -61,9 +62,11 @@ static void test_PackageStatics(void)
IStorageFolder *storage_folder;
IActivationFactory *factory;
IStorageItem *storage_item;
WCHAR buffer[MAX_PATH];
HSTRING str, wine_str;
IPackage *package;
HSTRING str;
HRESULT hr;
INT32 res;
LONG ref;
hr = WindowsCreateString( package_statics_name, wcslen( package_statics_name ), &str );
@ -107,6 +110,19 @@ static void test_PackageStatics(void)
hr = IStorageFolder_QueryInterface( storage_folder, &IID_IStorageItem, (void **)&storage_item );
ok( hr == S_OK, "got hr %#lx.\n", hr );
hr = IStorageItem_get_Path( storage_item, &str );
todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr );
GetModuleFileNameW( NULL, buffer, MAX_PATH );
hr = PathCchRemoveFileSpec( buffer, ARRAY_SIZE(buffer) );
todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr );
hr = WindowsCreateString( buffer, wcslen(buffer), &wine_str );
ok( hr == S_OK, "got hr %#lx.\n", hr );
hr = WindowsCompareStringOrdinal( str, wine_str, &res );
todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr );
todo_wine ok( !res, "got string %s.\n", debugstr_hstring(str) );
WindowsDeleteString( str );
WindowsDeleteString( wine_str );
ref = IStorageItem_Release( storage_item );
ok( ref == 1, "got ref %ld.\n", ref );
ref = IStorageFolder_Release( storage_folder );