mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 13:10:28 +00:00
vbscript: Added CStr implementation.
This commit is contained in:
parent
c046d30fb7
commit
470137b6d3
@ -402,8 +402,16 @@ static HRESULT Global_CSng(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARI
|
||||
|
||||
static HRESULT Global_CStr(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
|
||||
{
|
||||
FIXME("\n");
|
||||
return E_NOTIMPL;
|
||||
BSTR str;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("%s\n", debugstr_variant(arg));
|
||||
|
||||
hres = to_string(arg, &str);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
return return_bstr(res, str);
|
||||
}
|
||||
|
||||
static inline WCHAR hex_char(unsigned n)
|
||||
|
@ -38,6 +38,18 @@ Call ok(getVT(vbFriday) = "VT_I2", "getVT(vbFriday) = " & getVT(vbFriday))
|
||||
Call ok(vbSaturday = 7, "vbSaturday = " & vbSaturday)
|
||||
Call ok(getVT(vbSaturday) = "VT_I2", "getVT(vbSaturday) = " & getVT(vbSaturday))
|
||||
|
||||
Sub TestCStr(arg, exval)
|
||||
dim x
|
||||
x = CStr(arg)
|
||||
Call ok(getVT(x) = "VT_BSTR*", "getVT(x) = " & getVT(x))
|
||||
Call ok(x = exval, "CStr(" & arg & ") = " & x)
|
||||
End Sub
|
||||
|
||||
TestCStr "test", "test"
|
||||
TestCStr 3, "3"
|
||||
TestCStr 3.5, "3.5"
|
||||
if isEnglishLang then TestCStr true, "True"
|
||||
|
||||
Call ok(isObject(new EmptyClass), "isObject(new EmptyClass) is not true?")
|
||||
Set x = new EmptyClass
|
||||
Call ok(isObject(x), "isObject(x) is not true?")
|
||||
|
Loading…
Reference in New Issue
Block a user