vbscript: Added interp_and implementation.
This commit is contained in:
parent
69de07981a
commit
091f243051
|
@ -566,8 +566,26 @@ static HRESULT interp_not(exec_ctx_t *ctx)
|
|||
|
||||
static HRESULT interp_and(exec_ctx_t *ctx)
|
||||
{
|
||||
FIXME("\n");
|
||||
return E_NOTIMPL;
|
||||
variant_val_t r, l;
|
||||
VARIANT v;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
hres = stack_pop_val(ctx, &r);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
hres = stack_pop_val(ctx, &l);
|
||||
if(SUCCEEDED(hres)) {
|
||||
hres = VarAnd(l.v, r.v, &v);
|
||||
release_val(&l);
|
||||
}
|
||||
release_val(&r);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
return stack_push(ctx, &v);
|
||||
}
|
||||
|
||||
static HRESULT cmp_oper(exec_ctx_t *ctx)
|
||||
|
|
|
@ -86,6 +86,11 @@ if(isEnglishLocale) then
|
|||
Call ok(true & false = "TrueFalse", "true & false = " & (true & false))
|
||||
end if
|
||||
|
||||
call ok(true and true, "true and true is not true")
|
||||
call ok(true and not false, "true and not false is not true")
|
||||
call ok(not (false and true), "not (false and true) is not true")
|
||||
call ok(getVT(null and true) = "VT_NULL", "getVT(null and true) = " & getVT(null and true))
|
||||
|
||||
x = 3
|
||||
Call ok(2+2 = 4, "2+2 = " & (2+2))
|
||||
Call ok(false + 6 + true = 5, "false + 6 + true <> 5")
|
||||
|
|
Loading…
Reference in New Issue