Commit b72d8118 authored by Robert Wilhelm's avatar Robert Wilhelm Committed by Alexandre Julliard

vbscript: Implement IsArray.

parent d50f5f67
......@@ -961,8 +961,11 @@ static HRESULT Global_IsNumeric(BuiltinDisp *This, VARIANT *arg, unsigned args_c
static HRESULT Global_IsArray(BuiltinDisp *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
{
FIXME("\n");
return E_NOTIMPL;
TRACE("(%s)\n", debugstr_variant(arg));
assert(args_cnt == 1);
return return_bool(res, V_ISARRAY(arg));
}
static HRESULT Global_IsObject(BuiltinDisp *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
......
......@@ -223,6 +223,21 @@ arr(0) = 2
arr(1) = 3
Call ok(not isNumeric(arr), "isNumeric(arr) is not true?")
Call ok(isArray(arr), "isArray(arr) is not true?")
x = Array()
Call ok(isArray(arr), "isArray(Array()) is not true?")
Call ok(not isArray(Empty), "isArray(empty) is true?")
Call ok(not isArray(Null), "isArray(Null) is true?")
Call ok(not isArray(42), "isArray(42) is true?")
Call ok(not isArray(CSng(3242.4)), "isArray(CSng(3242.4)) is true?")
Call ok(not isArray(CCur(32768.4)), "isArray(CCur(32768.4)) is true?")
Call ok(not isArray("44"), "isArray(""44"") is true?")
Call ok(not isArray("rwrf"), "isArray(""rwrf"") is true?")
Call ok(not isArray(Nothing), "isArray(Nothing) is true?")
Call ok(not isArray(New EmptyClass), "isArray(New EmptyClass) is true?")
Call ok(not isArray(true), "isArray(true) is true?")
Call ok(not isArray(CByte(32)), "isArray(CByte(32)) is true?")
Call ok(getVT(Array()) = "VT_ARRAY|VT_VARIANT", "getVT(Array()) = " & getVT(Array()))
x = Array("a1", 2, "a3")
Call ok(getVT(x) = "VT_ARRAY|VT_VARIANT*", "getVT(array) = " & getVT(x))
......
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