mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 21:20:25 +00:00
vbscript: Added interp_neg implementation.
This commit is contained in:
parent
fb5509ec06
commit
8e1ccb8be6
@ -393,8 +393,20 @@ static HRESULT interp_concat(exec_ctx_t *ctx)
|
||||
|
||||
static HRESULT interp_neg(exec_ctx_t *ctx)
|
||||
{
|
||||
FIXME("\n");
|
||||
return E_NOTIMPL;
|
||||
variant_val_t val;
|
||||
VARIANT v;
|
||||
HRESULT hres;
|
||||
|
||||
hres = stack_pop_val(ctx, &val);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
hres = VarNeg(val.v, &v);
|
||||
release_val(&val);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
return stack_push(ctx, &v);
|
||||
}
|
||||
|
||||
static const instr_func_t op_funcs[] = {
|
||||
|
@ -35,6 +35,10 @@ Call ok(0 = 0.0, "0 <> 0.0")
|
||||
Call ok(16 = &h10&, "16 <> &h10&")
|
||||
Call ok(010 = 10, "010 <> 10")
|
||||
Call ok(10. = 10, "10. <> 10")
|
||||
Call ok(&hffFFffFF& = -1, "&hffFFffFF& <> -1")
|
||||
Call ok(&hffFFffFF& = -1, "&hffFFffFF& <> -1")
|
||||
Call ok(--1 = 1, "--1 = " & --1)
|
||||
Call ok(-empty = 0, "-empty = " & (-empty))
|
||||
|
||||
Call ok(getVT(false) = "VT_BOOL", "getVT(false) is not VT_BOOL")
|
||||
Call ok(getVT(true) = "VT_BOOL", "getVT(true) is not VT_BOOL")
|
||||
@ -53,6 +57,8 @@ Call ok(getVT(&h10000&) = "VT_I4", "getVT(&h10000&) is not VT_I4")
|
||||
Call ok(getVT(&H10000&) = "VT_I4", "getVT(&H10000&) is not VT_I4")
|
||||
Call ok(getVT(&hffFFffFF&) = "VT_I2", "getVT(&hffFFffFF&) is not VT_I2")
|
||||
Call ok(getVT(1 & 100000) = "VT_BSTR", "getVT(1 & 100000) is not VT_BSTR")
|
||||
Call ok(getVT(-empty) = "VT_I2", "getVT(-empty) = " & getVT(-empty))
|
||||
Call ok(getVT(-null) = "VT_NULL", "getVT(-null) = " & getVT(-null))
|
||||
|
||||
Call ok("ab" & "cd" = "abcd", """ab"" & ""cd"" <> ""abcd""")
|
||||
Call ok("ab " & null = "ab ", """ab"" & null = " & ("ab " & null))
|
||||
|
Loading…
Reference in New Issue
Block a user