jscript: Added '!==' expression implementation.

This commit is contained in:
Jacek Caban 2008-09-09 01:26:37 +02:00 committed by Alexandre Julliard
parent c3938073da
commit d7c8c2544d
2 changed files with 21 additions and 3 deletions

View File

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

View File

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