vbscript: Added interp_lteq implementation.

This commit is contained in:
Jacek Caban 2011-09-19 14:07:51 +02:00 committed by Alexandre Julliard
parent ac5db68d02
commit 33a81218ad
2 changed files with 14 additions and 2 deletions

View File

@ -991,8 +991,18 @@ static HRESULT interp_lt(exec_ctx_t *ctx)
static HRESULT interp_lteq(exec_ctx_t *ctx)
{
FIXME("\n");
return E_NOTIMPL;
VARIANT v;
HRESULT hres;
TRACE("\n");
hres = cmp_oper(ctx);
if(FAILED(hres))
return hres;
V_VT(&v) = VT_BOOL;
V_BOOL(&v) = hres == VARCMP_LT || hres == VARCMP_EQ ? VARIANT_TRUE : VARIANT_FALSE;
return stack_push(ctx, &v);
}
static HRESULT interp_concat(exec_ctx_t *ctx)

View File

@ -126,6 +126,8 @@ Call ok(not (true > 0), "true > 0")
Call ok(not (0 > 1 = 1), "0 > 1 = 1")
Call ok(1 < 2, "! 1 < 2")
Call ok(1 = 1 < 0, "! 1 = 1 < 0")
Call ok(1 <= 2, "! 1 <= 2")
Call ok(2 <= 2, "! 2 <= 2")
x = 3
Call ok(2+2 = 4, "2+2 = " & (2+2))