Hi Thomas,
On 5/17/10 3:05 AM, Thomas Mullaly wrote:
> Added tests to make sure IUri_GetPropertyBSTR / IUri_GetPropertyDWORD
> / IUri_GetPropertyLength handle invalid arguments correctly. Fixed
> up/added some comments.
>
> Had to add a dependency to urlmon for oleaut32. This is because the
> Uri interface returns all the string properties of a URI as BSTR's and
> it needs the SysAllocString/SysFreeString functions in oleau32. I
> checked on windows using Dependency Walker and the native version of
> urlmon has this same dependency.
-IMPORTS = uuid ole32 rpcrt4 shlwapi wininet user32 advapi32 kernel32 ntdll
+IMPORTS = uuid ole32 oleaut32 rpcrt4 shlwapi wininet user32 advapi32 kernel32 ntdll
You should add oleaut32 dependency in a patch that uses its functions.
hr = IUri_GetPropertyBSTR(uri, i,&str, 0);
+ todo_wine {
+ ok(hr == S_OK, "Error: GetPropertyBSTR returned 0x%08x, expected 0x%08x. property=%d\n",
+ hr, S_OK, i);
+ }
+ todo_wine { ok(str != NULL, "Error: Expected the BSTR not to be NULL, property=%d\n", i); }
+ ok(!SysStringLen(str), "Error: Expected the BSTR to be of length 0, but it was %d instead. property=%d\n",
+ SysStringLen(str), i);
You will have to add tests for the exact values returned sooner or later, so this will be tested better then. There is not much value in tests like this.
+ if(str) SysFreeString(str);
You don't need NULL check here.
Thanks,
Jacek