Commit 030a6860 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

jscript/tests: Enable compilation with long types.

parent 964a6e99
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = jscript.dll
IMPORTS = oleaut32 ole32 advapi32
......
......@@ -140,7 +140,7 @@ static HRESULT WINAPI ObjectWithSite_SetSite(IObjectWithSite *iface, IUnknown *p
ok(pUnkSite != NULL, "pUnkSite == NULL\n");
hres = IUnknown_QueryInterface(pUnkSite, &IID_IServiceProvider, (void**)&sp);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08lx\n", hres);
IServiceProvider_Release(sp);
return SetSite_hres;
......@@ -223,7 +223,7 @@ static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember,
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
{
ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex);
ok(0, "unexpected call %s %lx\n", wine_dbgstr_w(bstrName), grfdex);
return E_NOTIMPL;
}
......@@ -260,7 +260,7 @@ static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown
static HRESULT WINAPI Test_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
{
if(!lstrcmpW(bstrName, L"reportSuccess")) {
ok(grfdex == fdexNameCaseSensitive, "grfdex = %x\n", grfdex);
ok(grfdex == fdexNameCaseSensitive, "grfdex = %lx\n", grfdex);
*pid = DISPID_TEST_REPORTSUCCESS;
return S_OK;
}
......@@ -316,7 +316,7 @@ static IDispatchEx testObj = { &testObjVtbl };
static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
{
if(!lstrcmpW(bstrName, L"ok")) {
ok(grfdex == fdexNameCaseSensitive, "grfdex = %x\n", grfdex);
ok(grfdex == fdexNameCaseSensitive, "grfdex = %lx\n", grfdex);
*pid = DISPID_GLOBAL_OK;
return S_OK;
}
......@@ -449,14 +449,14 @@ static HRESULT WINAPI InternetHostSecurityManager_ProcessUrlAction(IInternetHost
{
CHECK_EXPECT(ProcessUrlAction);
ok(dwAction == URLACTION_ACTIVEX_RUN, "dwAction = %x\n", dwAction);
ok(dwAction == URLACTION_ACTIVEX_RUN, "dwAction = %lx\n", dwAction);
ok(pPolicy != NULL, "pPolicy == NULL\n");
ok(cbPolicy == sizeof(DWORD), "cbPolicy = %d\n", cbPolicy);
ok(cbPolicy == sizeof(DWORD), "cbPolicy = %ld\n", cbPolicy);
ok(pContext != NULL, "pContext == NULL\n");
ok(cbContext == sizeof(GUID), "cbContext = %d\n", cbContext);
ok(cbContext == sizeof(GUID), "cbContext = %ld\n", cbContext);
ok(IsEqualGUID(pContext, &CLSID_TestObj), "pContext = %s\n", wine_dbgstr_guid((const IID*)pContext));
ok(!dwFlags, "dwFlags = %x\n", dwFlags);
ok(!dwReserved, "dwReserved = %x\n", dwReserved);
ok(!dwFlags, "dwFlags = %lx\n", dwFlags);
ok(!dwReserved, "dwReserved = %lx\n", dwReserved);
if(SUCCEEDED(ProcessUrlAction_hres))
*(DWORD*)pPolicy = ProcessUrlAction_policy;
......@@ -476,12 +476,12 @@ static HRESULT WINAPI InternetHostSecurityManager_QueryCustomPolicy(IInternetHos
ok(ppPolicy != NULL, "ppPolicy == NULL\n");
ok(pcbPolicy != NULL, "pcbPolicy == NULL\n");
ok(pContext != NULL, "pContext == NULL\n");
ok(cbContext == sizeof(struct CONFIRMSAFETY), "cbContext = %d\n", cbContext);
ok(!dwReserved, "dwReserved = %x\n", dwReserved);
ok(cbContext == sizeof(struct CONFIRMSAFETY), "cbContext = %ld\n", cbContext);
ok(!dwReserved, "dwReserved = %lx\n", dwReserved);
/* TODO: CLSID */
ok(cs->pUnk != NULL, "cs->pUnk == NULL\n");
ok(!cs->dwFlags, "dwFlags = %x\n", cs->dwFlags);
ok(!cs->dwFlags, "dwFlags = %lx\n", cs->dwFlags);
if(FAILED(QueryCustomPolicy_hres))
return QueryCustomPolicy_hres;
......@@ -592,7 +592,7 @@ static HRESULT WINAPI ActiveScriptSite_GetLCID(IActiveScriptSite *iface, LCID *p
static HRESULT WINAPI ActiveScriptSite_GetItemInfo(IActiveScriptSite *iface, LPCOLESTR pstrName,
DWORD dwReturnMask, IUnknown **ppiunkItem, ITypeInfo **ppti)
{
ok(dwReturnMask == SCRIPTINFO_IUNKNOWN, "unexpected dwReturnMask %x\n", dwReturnMask);
ok(dwReturnMask == SCRIPTINFO_IUNKNOWN, "unexpected dwReturnMask %lx\n", dwReturnMask);
ok(!ppti, "ppti != NULL\n");
ok(!lstrcmpW(pstrName, L"test"), "pstrName = %s\n", wine_dbgstr_w(pstrName));
......@@ -656,7 +656,7 @@ static void set_safety_options(IUnknown *unk, BOOL use_sec_mgr)
HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IObjectSafety, (void**)&safety);
ok(hres == S_OK, "Could not get IObjectSafety: %08x\n", hres);
ok(hres == S_OK, "Could not get IObjectSafety: %08lx\n", hres);
if(FAILED(hres))
return;
......@@ -667,13 +667,13 @@ static void set_safety_options(IUnknown *unk, BOOL use_sec_mgr)
options_set = INTERFACE_USES_DISPEX;
hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, options_all, options_set);
ok(hres == S_OK, "SetInterfaceSafetyOptions failed: %08x\n", hres);
ok(hres == S_OK, "SetInterfaceSafetyOptions failed: %08lx\n", hres);
supported = enabled = 0xdeadbeef;
hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, &supported, &enabled);
ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08x\n", hres);
ok(supported == options_all, "supported=%x, expected %x\n", supported, options_all);
ok(enabled == options_set, "enabled=%x, expected %x\n", enabled, options_set);
ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08lx\n", hres);
ok(supported == options_all, "supported=%lx, expected %lx\n", supported, options_all);
ok(enabled == options_set, "enabled=%lx, expected %lx\n", enabled, options_set);
IObjectSafety_Release(safety);
}
......@@ -684,7 +684,7 @@ static void _parse_script(unsigned line, IActiveScriptParse *parser, const WCHAR
HRESULT hres;
hres = IActiveScriptParse_ParseScriptText(parser, script, NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
ok_(__FILE__,line)(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
}
static IActiveScriptParse *create_script(BOOL skip_tests, BOOL use_sec_mgr)
......@@ -707,7 +707,7 @@ static IActiveScriptParse *create_script(BOOL skip_tests, BOOL use_sec_mgr)
hres = CoCreateInstance(&CLSID_JScript, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IActiveScript, (void**)&script);
if(!skip_tests)
ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres);
ok(hres == S_OK, "CoCreateInstance failed: %08lx\n", hres);
if(FAILED(hres))
return NULL;
......@@ -715,20 +715,20 @@ static IActiveScriptParse *create_script(BOOL skip_tests, BOOL use_sec_mgr)
set_safety_options((IUnknown*)script, use_sec_mgr);
hres = IActiveScript_QueryInterface(script, &IID_IActiveScriptParse, (void**)&parser);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08lx\n", hres);
hres = IActiveScriptParse_InitNew(parser);
ok(hres == S_OK, "InitNew failed: %08x\n", hres);
ok(hres == S_OK, "InitNew failed: %08lx\n", hres);
hres = IActiveScript_SetScriptSite(script, &ActiveScriptSite);
ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres);
ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres);
hres = IActiveScript_AddNamedItem(script, L"test",
SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS);
ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres);
ok(hres == S_OK, "AddNamedItem failed: %08lx\n", hres);
hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_STARTED);
ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres);
ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08lx\n", hres);
IActiveScript_Release(script);
......@@ -757,16 +757,16 @@ static IDispatchEx *parse_procedure(IActiveScriptParse *parser, const WCHAR *src
HRESULT hres;
hres = IActiveScriptParse_QueryInterface(parser, &IID_IActiveScriptParseProcedure2, (void**)&parse_proc);
ok(hres == S_OK, "Could not get IActiveScriptParseProcedure2: %08x\n", hres);
ok(hres == S_OK, "Could not get IActiveScriptParseProcedure2: %08lx\n", hres);
hres = IActiveScriptParseProcedure2_ParseProcedureText(parse_proc, src, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, &disp);
IActiveScriptParseProcedure2_Release(parse_proc);
ok(hres == S_OK, "ParseProcedureText failed: %08x\n", hres);
ok(hres == S_OK, "ParseProcedureText failed: %08lx\n", hres);
ok(disp != NULL, "disp == NULL\n");
hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
IDispatch_Release(disp);
ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IDispatchEx iface: %08lx\n", hres);
return dispex;
}
......@@ -779,7 +779,7 @@ static void _call_procedure(unsigned line, IDispatchEx *proc, IServiceProvider *
HRESULT hres;
hres = IDispatchEx_InvokeEx(proc, DISPID_VALUE, 0, DISPATCH_METHOD, &dp, NULL, &ei, caller);
ok_(__FILE__,line)(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
}
......@@ -1080,7 +1080,7 @@ static BOOL register_activex(void)
hres = CoRegisterClassObject(&CLSID_TestObj, (IUnknown *)&activex_cf,
CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &regid);
ok(hres == S_OK, "Could not register script engine: %08x\n", hres);
ok(hres == S_OK, "Could not register script engine: %08lx\n", hres);
return TRUE;
}
......
......@@ -102,7 +102,7 @@ static void _call_change_type(unsigned line, IVariantChangeType *change_type, VA
SET_EXPECT(OnLeaveScript);
}
hres = IVariantChangeType_ChangeType(change_type, dst, src, 0, vt);
ok_(__FILE__,line)(hres == S_OK, "ChangeType(%d) failed: %08x\n", vt, hres);
ok_(__FILE__,line)(hres == S_OK, "ChangeType(%d) failed: %08lx\n", vt, hres);
ok_(__FILE__,line)(V_VT(dst) == vt, "V_VT(dst) = %d\n", V_VT(dst));
if(V_VT(src) == VT_DISPATCH && vt != VT_BOOL) {
CHECK_CALLED(OnEnterScript);
......@@ -118,7 +118,7 @@ static void _change_type_fail(unsigned line, IVariantChangeType *change_type, VA
V_VT(&v) = VT_EMPTY;
hres = IVariantChangeType_ChangeType(change_type, &v, src, 0, vt);
ok_(__FILE__,line)(hres == exhres, "ChangeType failed: %08x, expected %08x\n", hres, exhres);
ok_(__FILE__,line)(hres == exhres, "ChangeType failed: %08lx, expected %08lx\n", hres, exhres);
}
static void test_change_type(IVariantChangeType *change_type, VARIANT *src, const conv_results_t *ex)
......@@ -126,7 +126,7 @@ static void test_change_type(IVariantChangeType *change_type, VARIANT *src, cons
VARIANT v;
call_change_type(change_type, &v, src, VT_I4);
ok(V_I4(&v) == ex->int_result, "V_I4(v) = %d, expected %d\n", V_I4(&v), ex->int_result);
ok(V_I4(&v) == ex->int_result, "V_I4(v) = %ld, expected %d\n", V_I4(&v), ex->int_result);
call_change_type(change_type, &v, src, VT_UI2);
ok(V_UI2(&v) == (UINT16)ex->int_result, "V_UI2(v) = %u, expected %u\n", V_UI2(&v), (UINT16)ex->int_result);
......@@ -208,14 +208,14 @@ static void test_change_types(IVariantChangeType *change_type, IDispatch *obj_di
V_BOOL(&v) = VARIANT_FALSE;
V_VT(&dst) = 0xdead;
hres = IVariantChangeType_ChangeType(change_type, &dst, &v, 0, VT_I4);
ok(hres == DISP_E_BADVARTYPE, "ChangeType failed: %08x, expected DISP_E_BADVARTYPE\n", hres);
ok(hres == DISP_E_BADVARTYPE, "ChangeType failed: %08lx, expected DISP_E_BADVARTYPE\n", hres);
ok(V_VT(&dst) == 0xdead, "V_VT(dst) = %d\n", V_VT(&dst));
/* Test conversion in place */
V_VT(&v) = VT_BSTR;
V_BSTR(&v) = str = SysAllocString(L"test");
hres = IVariantChangeType_ChangeType(change_type, &v, &v, 0, VT_BSTR);
ok(hres == S_OK, "ChangeType failed: %08x\n", hres);
ok(hres == S_OK, "ChangeType failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(v) = %d\n", V_VT(&v));
ok(V_BSTR(&v) != str, "V_BSTR(v) == str\n");
ok(!lstrcmpW(V_BSTR(&v), L"test"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
......@@ -228,7 +228,7 @@ static void test_caller(IServiceProvider *caller, IDispatch *arg_obj)
HRESULT hres;
hres = IServiceProvider_QueryService(caller, &SID_VariantConversion, &IID_IVariantChangeType, (void**)&change_type);
ok(hres == S_OK, "Could not get SID_VariantConversion service: %08x\n", hres);
ok(hres == S_OK, "Could not get SID_VariantConversion service: %08lx\n", hres);
ok(change_type == script_change_type, "change_type != script_change_type\n");
test_change_types(change_type, arg_obj);
......@@ -291,7 +291,7 @@ static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember,
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
{
ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex);
ok(0, "unexpected call %s %lx\n", wine_dbgstr_w(bstrName), grfdex);
return E_NOTIMPL;
}
......@@ -328,7 +328,7 @@ static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown
static HRESULT WINAPI Test_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
{
if(!lstrcmpW(bstrName, L"testArgConv")) {
ok(grfdex == fdexNameCaseSensitive, "grfdex = %x\n", grfdex);
ok(grfdex == fdexNameCaseSensitive, "grfdex = %lx\n", grfdex);
*pid = DISPID_TEST_TESTARGCONV;
return S_OK;
}
......@@ -424,7 +424,7 @@ static HRESULT WINAPI ActiveScriptSite_GetLCID(IActiveScriptSite *iface, LCID *p
static HRESULT WINAPI ActiveScriptSite_GetItemInfo(IActiveScriptSite *iface, LPCOLESTR pstrName,
DWORD dwReturnMask, IUnknown **ppiunkItem, ITypeInfo **ppti)
{
ok(dwReturnMask == SCRIPTINFO_IUNKNOWN, "unexpected dwReturnMask %x\n", dwReturnMask);
ok(dwReturnMask == SCRIPTINFO_IUNKNOWN, "unexpected dwReturnMask %lx\n", dwReturnMask);
ok(!ppti, "ppti != NULL\n");
ok(!lstrcmpW(pstrName, L"test"), "pstrName = %s\n", wine_dbgstr_w(pstrName));
......@@ -487,7 +487,7 @@ static void _parse_script(unsigned line, IActiveScriptParse *parser, const WCHAR
HRESULT hres;
hres = IActiveScriptParse_ParseScriptText(parser, script, NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
ok_(__FILE__,line)(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
}
static IActiveScriptParse *create_script(void)
......@@ -502,20 +502,20 @@ static IActiveScriptParse *create_script(void)
return NULL;
hres = IActiveScript_QueryInterface(script, &IID_IActiveScriptParse, (void**)&parser);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08lx\n", hres);
hres = IActiveScriptParse_InitNew(parser);
ok(hres == S_OK, "InitNew failed: %08x\n", hres);
ok(hres == S_OK, "InitNew failed: %08lx\n", hres);
hres = IActiveScript_SetScriptSite(script, &ActiveScriptSite);
ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres);
ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres);
hres = IActiveScript_AddNamedItem(script, L"test",
SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS);
ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres);
ok(hres == S_OK, "AddNamedItem failed: %08lx\n", hres);
hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_STARTED);
ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres);
ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08lx\n", hres);
IActiveScript_Release(script);
......@@ -530,7 +530,7 @@ static void run_scripts(void)
parser = create_script();
hres = IActiveScriptParse_QueryInterface(parser, &IID_IVariantChangeType, (void**)&script_change_type);
ok(hres == S_OK, "Could not get IVariantChangeType iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IVariantChangeType iface: %08lx\n", hres);
SET_EXPECT(OnEnterScript); /* checked in callback */
SET_EXPECT(testArgConv);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment