Commit 53040dee authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Added VT_R8 to string conversion implementation.

parent 8597d42c
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment