mirror of
https://github.com/reactos/wine.git
synced 2024-11-27 21:50:37 +00:00
jscript: Added VT_R8 to string conversion implementation.
This commit is contained in:
parent
8597d42cf5
commit
53040deefd
@ -441,6 +441,18 @@ HRESULT to_string(script_ctx_t *ctx, VARIANT *v, jsexcept_t *ei, BSTR *str)
|
||||
case VT_I4:
|
||||
*str = int_to_bstr(V_I4(v));
|
||||
break;
|
||||
case VT_R8: {
|
||||
VARIANT strv;
|
||||
HRESULT hres;
|
||||
|
||||
V_VT(&strv) = VT_EMPTY;
|
||||
hres = VariantChangeType(&strv, v, 0, VT_BSTR);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
*str = V_BSTR(&strv);
|
||||
return S_OK;
|
||||
}
|
||||
case VT_BSTR:
|
||||
*str = SysAllocString(V_BSTR(v));
|
||||
break;
|
||||
|
@ -366,6 +366,8 @@ ok("" + null === "null", "\"\" + null !== \"null\"");
|
||||
ok("" + undefined === "undefined", "\"\" + undefined !== \"undefined\"");
|
||||
ok("" + true === "true", "\"\" + true !== \"true\"");
|
||||
ok("" + false === "false", "\"\" + false !== \"false\"");
|
||||
ok("" + 0.5 === "0.5", "'' + 0.5 = " + 0.5);
|
||||
ok("" + (-0.5432) === "-0.5432", "'' + (-0.5432) = " + (-0.5432));
|
||||
|
||||
ok(1 < 3.4, "1 < 3.4 failed");
|
||||
ok(!(3.4 < 1), "3.4 < 1");
|
||||
|
Loading…
Reference in New Issue
Block a user