jscript: Added '!=' expression implementation.

This commit is contained in:
Jacek Caban 2008-09-17 23:29:34 +02:00 committed by Alexandre Julliard
parent d699834892
commit 47fcf8d0c7
2 changed files with 19 additions and 2 deletions

View File

@ -1993,11 +1993,25 @@ HRESULT equal2_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD flags
return return_bool(ret, b);
}
/* ECMA-262 3rd Edition 11.9.2 */
HRESULT not_equal_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD flags, jsexcept_t *ei, exprval_t *ret)
{
binary_expression_t *expr = (binary_expression_t*)_expr;
VARIANT rval, lval;
BOOL b;
HRESULT hres;
FIXME("\n");
return E_NOTIMPL;
TRACE("\n");
hres = get_binary_expr_values(ctx, expr, ei, &lval, &rval);
if(FAILED(hres))
return hres;
hres = equal_values(ctx, &lval, &rval, ei, &b);
if(FAILED(hres))
return hres;
return return_bool(ret, !b);
}
/* ECMA-262 3rd Edition 11.9.5 */

View File

@ -49,6 +49,9 @@ ok(true == 1, "true == 1 is false");
ok(!(true == 2), "true == 2");
ok(0 == false, "0 == false is false");
ok(1 != 2, "1 != 2 is false");
ok(false != 1, "false != 1 is false");
var trueVar = true;
ok(trueVar, "trueVar is not true");