jscript: Added ScriptEngine*Version functions implementation.
This commit is contained in:
parent
36fe9472c2
commit
f8afae75b5
|
@ -727,22 +727,37 @@ static HRESULT JSGlobal_ScriptEngine(script_ctx_t *ctx, vdisp_t *jsthis, WORD fl
|
|||
static HRESULT JSGlobal_ScriptEngineMajorVersion(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||
{
|
||||
FIXME("\n");
|
||||
return E_NOTIMPL;
|
||||
TRACE("\n");
|
||||
|
||||
if(retv) {
|
||||
V_VT(retv) = VT_I4;
|
||||
V_I4(retv) = JSCRIPT_MAJOR_VERSION;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT JSGlobal_ScriptEngineMinorVersion(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||
{
|
||||
FIXME("\n");
|
||||
return E_NOTIMPL;
|
||||
TRACE("\n");
|
||||
|
||||
if(retv) {
|
||||
V_VT(retv) = VT_I4;
|
||||
V_I4(retv) = JSCRIPT_MINOR_VERSION;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT JSGlobal_ScriptEngineBuildVersion(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||
{
|
||||
FIXME("\n");
|
||||
return E_NOTIMPL;
|
||||
TRACE("\n");
|
||||
|
||||
if(retv) {
|
||||
V_VT(retv) = VT_I4;
|
||||
V_I4(retv) = JSCRIPT_BUILD_VERSION;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT JSGlobal_CollectGarbage(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp,
|
||||
|
|
|
@ -18,6 +18,10 @@
|
|||
|
||||
#include <windef.h>
|
||||
|
||||
#define JSCRIPT_MAJOR_VERSION 5
|
||||
#define JSCRIPT_MINOR_VERSION 8
|
||||
#define JSCRIPT_BUILD_VERSION 16475
|
||||
|
||||
#define IDS_TO_PRIMITIVE 0x0001
|
||||
#define IDS_INVALID_CALL_ARG 0x0005
|
||||
#define IDS_SUBSCRIPT_OUT_OF_RANGE 0x0009
|
||||
|
|
|
@ -20,6 +20,9 @@ var tmp, i;
|
|||
|
||||
ok(ScriptEngine() === "JScript", "ScriptEngine() = " + ScriptEngine());
|
||||
ok(ScriptEngine(3) === "JScript", "ScriptEngine(3) = " + ScriptEngine(3));
|
||||
ok(ScriptEngineMajorVersion() === ScriptEngineMajorVersion(2), "ScriptEngineMajorVersion() !== ScriptEngineMajorVersion(2)");
|
||||
ok(ScriptEngineMinorVersion() === ScriptEngineMinorVersion(2), "ScriptEngineMinorVersion() !== ScriptEngineMinorVersion(2)");
|
||||
ok(ScriptEngineBuildVersion() === ScriptEngineBuildVersion(2), "ScriptEngineBuildVersion() !== ScriptEngineBuildVersion(2)");
|
||||
|
||||
i = parseInt("0");
|
||||
ok(i === 0, "parseInt('0') = " + i);
|
||||
|
|
Loading…
Reference in New Issue