On 3/25/22 04:44, Mohamad Al-Jaf wrote:
- /* VT_BSTR */
- V_VT(&var) = VT_BSTR;
- V_BSTR(&var) = NULL;
- result = VariantToStringWithDefault(&var, default_value);
- ok(!lstrcmpW(result, wstr_empty), "Unexpected value %s\n", wine_dbgstr_w(result));
- V_VT(&var) = VT_BSTR;
- V_BSTR(&var) = SysAllocString(wstr_empty);
- result = VariantToStringWithDefault(&var, default_value);
- ok(!lstrcmpW(result, wstr_empty), "Unexpected value %s\n", wine_dbgstr_w(result));
- SysFreeString(V_BSTR(&var));
- V_VT(&var) = VT_BSTR;
- V_BSTR(&var) = SysAllocString(wstr_space);
- result = VariantToStringWithDefault(&var, default_value);
- ok(!lstrcmpW(result, wstr_space), "Unexpected value %s\n", wine_dbgstr_w(result));
- SysFreeString(V_BSTR(&var));
- V_VT(&var) = VT_BSTR;
- V_BSTR(&var) = SysAllocString(wstr_test2);
- result = VariantToStringWithDefault(&var, default_value);
- ok(!lstrcmpW(result, wstr_test2), "Unexpected value %s\n", wine_dbgstr_w(result));
- SysFreeString(V_BSTR(&var));
What you need to test is returned pointer value.