From e9ad716a3436d7653169e2432c71530a9cc8e7b5 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 21 Sep 2011 14:04:30 +0200 Subject: [PATCH] vbscript: Added const statement tests. --- dlls/vbscript/tests/lang.vbs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index 7c64adf9532..2d712f5fe19 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -688,4 +688,22 @@ Call obj.test(obj) Call ok(getVT(test) = "VT_DISPATCH", "getVT(test) = " & getVT(test)) Call ok(Me is Test, "Me is not Test") +Const c1 = 1, c2 = 2 +Call ok(c1 = 1, "c1 = " & c1) +Call ok(getVT(c1) = "VT_I2", "getVT(c1) = " & getVT(c1)) + +if false then Const conststr = "str" +Call ok(conststr = "str", "conststr = " & conststr) +Call ok(getVT(conststr) = "VT_BSTR", "getVT(conststr) = " & getVT(conststr)) +Call ok(conststr = "str", "conststr = " & conststr) + +Sub ConstTestSub + Const funcconst = 1 + Call ok(c1 = 1, "c1 = " & c1) + Call ok(funcconst = 1, "funcconst = " & funcconst) +End Sub + +Call ConstTestSub +Dim funcconst + reportSuccess() -- 2.11.4.GIT