mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 21:20:25 +00:00
vbscript: Added interp_nothing implementation and tests.
This commit is contained in:
parent
8864c8dbae
commit
9848d6be2e
@ -599,8 +599,13 @@ static HRESULT interp_null(exec_ctx_t *ctx)
|
||||
|
||||
static HRESULT interp_nothing(exec_ctx_t *ctx)
|
||||
{
|
||||
FIXME("\n");
|
||||
return E_NOTIMPL;
|
||||
VARIANT v;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
V_VT(&v) = VT_DISPATCH;
|
||||
V_DISPATCH(&v) = NULL;
|
||||
return stack_push(ctx, &v);
|
||||
}
|
||||
|
||||
static HRESULT interp_not(exec_ctx_t *ctx)
|
||||
|
@ -71,9 +71,14 @@ Call ok(getVT(1 & 100000) = "VT_BSTR", "getVT(1 & 100000) is not VT_BSTR")
|
||||
Call ok(getVT(-empty) = "VT_I2", "getVT(-empty) = " & getVT(-empty))
|
||||
Call ok(getVT(-null) = "VT_NULL", "getVT(-null) = " & getVT(-null))
|
||||
Call ok(getVT(y) = "VT_EMPTY*", "getVT(y) = " & getVT(y))
|
||||
Call ok(getVT(nothing) = "VT_DISPATCH", "getVT(nothing) = " & getVT(nothing))
|
||||
set x = nothing
|
||||
Call ok(getVT(x) = "VT_DISPATCH*", "getVT(x=nothing) = " & getVT(x))
|
||||
x = true
|
||||
Call ok(getVT(x) = "VT_BOOL*", "getVT(x) = " & getVT(x))
|
||||
|
||||
Call ok(isNullDisp(nothing), "nothing is not nulldisp?")
|
||||
|
||||
x = "xx"
|
||||
Call ok("ab" & "cd" = "abcd", """ab"" & ""cd"" <> ""abcd""")
|
||||
Call ok("ab " & null = "ab ", """ab"" & null = " & ("ab " & null))
|
||||
|
@ -70,6 +70,7 @@ DEFINE_EXPECT(testobj_propput_i);
|
||||
#define DISPID_GLOBAL_ISENGLOC 1004
|
||||
#define DISPID_GLOBAL_VBVAR 1005
|
||||
#define DISPID_GLOBAL_TESTOBJ 1006
|
||||
#define DISPID_GLOBAL_ISNULLDISP 1007
|
||||
|
||||
#define DISPID_TESTOBJ_PROPPUT 2001
|
||||
|
||||
@ -329,6 +330,12 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD
|
||||
*pid = DISPID_GLOBAL_VBVAR;
|
||||
return S_OK;
|
||||
}
|
||||
if(!strcmp_wa(bstrName, "isNullDisp")) {
|
||||
test_grfdex(grfdex, fdexNameCaseInsensitive);
|
||||
*pid = DISPID_GLOBAL_ISNULLDISP;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
if(strict_dispid_check && strcmp_wa(bstrName, "x"))
|
||||
ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex);
|
||||
@ -459,6 +466,28 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
|
||||
V_VT(pvarRes) = VT_DISPATCH;
|
||||
V_DISPATCH(pvarRes) = (IDispatch*)&testObj;
|
||||
return S_OK;
|
||||
|
||||
case DISPID_GLOBAL_ISNULLDISP: {
|
||||
VARIANT *v;
|
||||
|
||||
ok(wFlags == (INVOKE_FUNC|INVOKE_PROPERTYGET), "wFlags = %x\n", wFlags);
|
||||
ok(pdp != NULL, "pdp == NULL\n");
|
||||
ok(pdp->rgvarg != NULL, "rgvarg == NULL\n");
|
||||
ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n");
|
||||
ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs);
|
||||
ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs);
|
||||
ok(pvarRes != NULL, "pvarRes == NULL\n");
|
||||
ok(pei != NULL, "pei == NULL\n");
|
||||
|
||||
v = pdp->rgvarg;
|
||||
if(V_VT(v) == (VT_VARIANT|VT_BYREF))
|
||||
v = V_VARIANTREF(v);
|
||||
|
||||
ok(V_VT(v) == VT_DISPATCH, "V_VT(psp->rgvargs) = %d\n", V_VT(pdp->rgvarg));
|
||||
V_VT(pvarRes) = VT_BOOL;
|
||||
V_BOOL(pvarRes) = V_DISPATCH(v) ? VARIANT_FALSE : VARIANT_TRUE;
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
ok(0, "unexpected call %d\n", id);
|
||||
|
Loading…
Reference in New Issue
Block a user