vbscript: Added interp_eqv implementation.

This commit is contained in:
Jacek Caban 2011-09-14 13:00:12 +02:00 committed by Alexandre Julliard
parent f17b35fdeb
commit 89c9a737f4
2 changed files with 24 additions and 2 deletions

View file

@ -638,8 +638,26 @@ static HRESULT interp_xor(exec_ctx_t *ctx)
static HRESULT interp_eqv(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 = VarEqv(l.v, r.v, &v);
release_val(&l);
}
release_val(&r);
if(FAILED(hres))
return hres;
return stack_push(ctx, &v);
}
static HRESULT interp_imp(exec_ctx_t *ctx)

View file

@ -102,6 +102,10 @@ call ok(not (false xor false), "false xor false is true?")
call ok(not (true or false xor true), "true or false xor true is true?")
call ok(not (true xor false or true), "true xor false or true is true?")
call ok(false eqv false, "false does not equal false?")
call ok(not (false eqv true), "false equals true?")
call ok(getVT(false eqv null) = "VT_NULL", "getVT(false eqv null) = " & getVT(false eqv null))
x = 3
Call ok(2+2 = 4, "2+2 = " & (2+2))
Call ok(false + 6 + true = 5, "false + 6 + true <> 5")