From b28bf173585aae8e6f8cfd128e96d513d5435780 Mon Sep 17 00:00:00 2001 From: Shuai Meng Date: Sat, 15 Mar 2014 22:15:24 +0800 Subject: [PATCH 11/11] vbscript/tests: Added tests for convert functions. --- dlls/vbscript/tests/api.vbs | 190 ++++++++++++++++++++++++++++++++++++++++++++ dlls/vbscript/tests/run.c | 6 ++ 2 files changed, 196 insertions(+) diff --git a/dlls/vbscript/tests/api.vbs b/dlls/vbscript/tests/api.vbs index 7c3927e..e50750d 100644 --- a/dlls/vbscript/tests/api.vbs +++ b/dlls/vbscript/tests/api.vbs @@ -463,4 +463,194 @@ Call ok(getVT(CBool(0)) = "VT_BOOL", "getVT(CBool(0)) = " & getVT(CBool(0))) Call ok(CBool(-5) = true, "CBool(-5) = " & CBool(-5)) Call ok(getVT(CBool(-5)) = "VT_BOOL", "getVT(CBool(-5)) = " & getVT(CBool(-5))) +Call ok(CBool(Empty) = False, "CBool(Empty) = " & CBool(Empty)) +Call ok(getVT(CBool(Empty)) = "VT_BOOL", "getVT(CBool(Empty)) = " & getVT(CBool(Empty))) +Call ok(CBool(1) = True, "CBool(1) = " & CBool(1)) +Call ok(getVT(CBool(1)) = "VT_BOOL", "getVT(CBool(1)) = " & getVT(CBool(1))) +Call ok(CBool(CLng(0)) = False, "CBool(CLng(0)) = " & CBool(CLng(0))) +Call ok(getVT(CBool(CLng(0))) = "VT_BOOL", "getVT(CBool(CLng(0))) = " & getVT(CBool(CLng(0)))) +Call ok(CBool(CSng(0.5)) = True, "CBool(CSng(0.5)) = " & CBool(CSng(0.5))) +Call ok(getVT(CBool(CSng(0.5))) = "VT_BOOL", "getVT(CBool(CSng(0.5))) = " & getVT(CBool(CSng(0.5)))) +Call ok(CBool(-0.56) = True, "CBool(-0.56) = " & CBool(-0.56)) +Call ok(getVT(CBool(-0.56)) = "VT_BOOL", "getVT(CBool(-0.56)) = " & getVT(CBool(-0.56))) +Call ok(CBool(CCur(8.55)) = True, "CBool(CCur(8.55)) = " & CBool(CCur(8.55))) +Call ok(getVT(CBool(CCur(8.55))) = "VT_BOOL", "getVT(CBool(CCur(8.55))) = " & getVT(CBool(CCur(8.55)))) +Call ok(CBool(CDate(0)) = False, "CBool(CDate(0)) = " & CBool(CDate(0))) +Call ok(getVT(CBool(CDate(0))) = "VT_BOOL", "getVT(CBool(CDate(0))) = " & getVT(CBool(CDate(0)))) +Call ok(CBool(CDate(3.33)) = True, "CBool(CDate(3.33)) = " & CBool(CDate(3.33))) +Call ok(getVT(CBool(CDate(3.33))) = "VT_BOOL", "getVT(CBool(CDate(3.33))) = " & getVT(CBool(CDate(3.33)))) +Call ok(CBool("6666.78") = True, "CBool(""6666.78"") = " & CBool("6666.78")) +Call ok(getVT(CBool("6666.78")) = "VT_BOOL", "getVT(CBool(""6666.78"")) = " & getVT(CBool("6666.78"))) +Call ok(CBool(CByte(-0.1)) = False, "CBool(CByte(-0.1)) = " & CBool(CByte(-0.1))) +Call ok(getVT(CBool(CByte(-0.1))) = "VT_BOOL", "getVT(CBool(CByte(-0.1))) = " & getVT(CBool(CByte(-0.1)))) + +Call ok(CByte(Empty) = 0, "CByte(Empty) = " & CByte(Empty)) +Call ok(getVT(CByte(Empty)) = "VT_UI1", "getVT(CByte(Empty)) = " & getVT(CByte(Empty))) +Call ok(CByte(255) = 255, "CByte(255) = " & CByte(255)) +Call ok(getVT(CByte(255)) = "VT_UI1", "getVT(CByte(255)) = " & getVT(CByte(255))) +Call ok(CByte(CLng(0)) = 0, "CByte(CLng(0)) = " & CByte(CLng(0))) +Call ok(getVT(CByte(CLng(0))) = "VT_UI1", "getVT(CByte(CLng(0))) = " & getVT(CByte(CLng(0)))) +Call ok(CByte(CSng(-0.5)) = 0, "CByte(CSng(-0.5)) = " & CByte(CSng(-0.5))) +Call ok(getVT(CByte(CSng(-0.5))) = "VT_UI1", "getVT(CByte(CSng(-0.5))) = " & getVT(CByte(CSng(-0.5)))) +Call ok(CByte(255.49) = 255, "CByte(255.49) = " & CByte(255.49)) +Call ok(getVT(CByte(255.49)) = "VT_UI1", "getVT(CByte(255.49)) = " & getVT(CByte(255.49))) +Call ok(CByte(CCur(8.55)) = 9, "CByte(CCur(8.55)) = " & CByte(CCur(8.55))) +Call ok(getVT(CByte(CCur(8.55))) = "VT_UI1", "getVT(CByte(CCur(8.55))) = " & getVT(CByte(CCur(8.55)))) +Call ok(CByte(CDate(0)) = 0, "CByte(CDate(0)) = " & CByte(CDate(0))) +Call ok(getVT(CByte(CDate(0))) = "VT_UI1", "getVT(CByte(CDate(0))) = " & getVT(CByte(CDate(0)))) +Call ok(CByte(CDate(3.33)) = 3, "CByte(CDate(3.33)) = " & CByte(CDate(3.33))) +Call ok(getVT(CByte(CDate(3.33))) = "VT_UI1", "getVT(CByte(CDate(3.33))) = " & getVT(CByte(CDate(3.33)))) +Call ok(CByte("6.78") = 7, "CByte(""6.78"") = " & CByte("6.78")) +Call ok(getVT(CByte("6.78")) = "VT_UI1", "getVT(CByte(""6.78"")) = " & getVT(CByte("6.78"))) +Call ok(CByte(True) = 255, "CByte(True) = " & CByte(True)) +Call ok(getVT(CByte(True)) = "VT_UI1", "getVT(CByte(True)) = " & getVT(CByte(True))) +Call ok(CByte(False) = 0, "CByte(False) = " & CByte(False)) +Call ok(getVT(CByte(False)) = "VT_UI1", "getVT(CByte(False)) = " & getVT(CByte(False))) + +Call ok(CCur(Empty) = 0, "CCur(Empty) = " & CCur(Empty)) +Call ok(getVT(CCur(Empty)) = "VT_CY", "getVT(CCur(Empty)) = " & getVT(CCur(Empty))) +Call ok(CCur(0) = 0, "CCur(CCur(0)) = " & CCur(0)) +Call ok(getVT(CCur(0)) = "VT_CY", "getVT(CCur(CCur(0))) = " & getVT(CCur(0))) +Call ok(CCur(CLng(0)) = 0, "CCur(CLng(0)) = " & CCur(CLng(0))) +Call ok(getVT(CCur(CLng(0))) = "VT_CY", "getVT(CCur(CLng(0))) = " & getVT(CCur(CLng(0)))) +Call ok(CCur(CSng(4.5)) = 4.5, "CCur(CSng(4.5)) = " & CCur(CSng(4.5))) +Call ok(getVT(CCur(CSng(4.5))) = "VT_CY", "getVT(CCur(CSng(4.5))) = " & getVT(CCur(CSng(4.5)))) +Call ok(CCur(-0.56) = -0.56, "CCur(-0.56) = " & CCur(-0.56)) +Call ok(getVT(CCur(-0.56)) = "VT_CY", "getVT(CCur(-0.56)) = " & getVT(CCur(-0.56))) +Call ok(CCur(CDate(0)) = 0, "CCur(CDate(0)) = " & CCur(CDate(0))) +Call ok(getVT(CCur(CDate(0))) = "VT_CY", "getVT(CCur(CDate(0))) = " & getVT(CCur(CDate(0)))) +Call ok(CCur("6.78") = 6.78, "CCur(""6.78"") = " & CCur("6.78")) +Call ok(getVT(CCur("6.78")) = "VT_CY", "getVT(CCur(""6.78"")) = " & getVT(CCur("6.78"))) +Call ok(CCur(True) = -1, "CCur(True) = " & CCur(True)) +Call ok(getVT(CCur(True)) = "VT_CY", "getVT(CCur(True)) = " & getVT(CCur(True))) +Call ok(CCur(False) = 0, "CCur(False) = " & CCur(False)) +Call ok(getVT(CCur(False)) = "VT_CY", "getVT(CCur(False)) = " & getVT(CCur(False))) +Call ok(CCur(CByte(5.49)) = 5, "CCur(CByte(5.49)) = " & CCur(CByte(5.49))) +Call ok(getVT(CCur(CByte(5.49))) = "VT_CY", "getVT(CCur(CByte(5.49))) = " & getVT(CCur(CByte(5.49)))) + +Call ok(CDbl(Empty) = 0, "CDbl(Empty) = " & CDbl(Empty)) +Call ok(getVT(CDbl(Empty)) = "VT_R8", "getVT(CDbl(Empty)) = " & getVT(CDbl(Empty))) +Call ok(CDbl(0) = 0, "CDbl(0) = " & CDbl(0)) +Call ok(getVT(CDbl(0)) = "VT_R8", "getVT(CDbl(0)) = " & getVT(CDbl(0))) +Call ok(CDbl(CLng(2147483647)) = 2147483647, "CDbl(CLng(2147483647)) = " & CDbl(CLng(2147483647))) +Call ok(getVT(CDbl(CLng(2147483647))) = "VT_R8", "getVT(CDbl(CLng(2147483647))) = " & getVT(CDbl(CLng(2147483647)))) +Call ok(CDbl(CSng(32767)) = 32767, "CDbl(CSng(32767)) = " & CDbl(CSng(32767))) +Call ok(getVT(CDbl(CSng(32767))) = "VT_R8", "getVT(CDbl(CSng(32767))) = " & getVT(CDbl(CSng(32767)))) +Call ok(CDbl(-2147483647.5) = -2147483647.5, "CDbl(-2147483647.5) = " & CDbl(-2147483647.5)) +Call ok(getVT(CDbl(-2147483647.5)) = "VT_R8", "getVT(CDbl(-2147483647.5)) = " & getVT(CDbl(-2147483647.5))) +Call ok(CDbl(CCur(7.5)) = 7.5, "CDbl(CCur(7.5)) = " & CDbl(CCur(7.5))) +Call ok(getVT(CDbl(CCur(7.5))) = "VT_R8", "getVT(CDbl(CCur(7.5))) = " & getVT(CDbl(CCur(7.5)))) +Call ok(CDbl(CDate(0)) = 0, "CDbl(CDate(0)) = " & CDbl(CDate(0))) +Call ok(getVT(CDbl(CDate(0))) = "VT_R8", "getVT(CDbl(CDate(0))) = " & getVT(CDbl(CDate(0)))) +Call ok(CDbl(CDate(6.49)) = 6.49, "CDbl(CDate(6.49)) = " & CDbl(CDate(6.49))) +Call ok(getVT(CDbl(CDate(6.49))) = "VT_R8", "getVT(CDbl(CDate(6.49))) = " & getVT(CDbl(CDate(6.49)))) +Call ok(CDbl("6.5") = 6.5, "CDbl(""6.5"") = " & CDbl("6.5")) +Call ok(getVT(CDbl("6.5")) = "VT_R8", "getVT(CDbl(""6.5"")) = " & getVT(CDbl("6.5"))) +Call ok(CDbl(True) = -1, "CDbl(True) = " & CDbl(True)) +Call ok(getVT(CDbl(True)) = "VT_R8", "getVT(CDbl(True)) = " & getVT(CDbl(True))) +Call ok(CDbl(False) = 0, "CDbl(False) = " & CDbl(False)) +Call ok(getVT(CDbl(False)) = "VT_R8", "getVT(CDbl(False)) = " & getVT(CDbl(False))) +Call ok(CDbl(CByte(7)) = 7, "CDbl(CByte(7)) = " & CDbl(CByte(7))) +Call ok(getVT(CDbl(CByte(7))) = "VT_R8", "getVT(CDbl(CByte(7))) = " & getVT(CDbl(CByte(7)))) + +Call ok(CInt(Empty) = 0, "CInt(Empty) = " & CInt(Empty)) +Call ok(getVT(CInt(Empty)) = "VT_I2", "getVT(CInt(Empty)) = " & getVT(CInt(Empty))) +Call ok(CInt(CLng(32767)) = 32767, "CInt(CLng(32767)) = " & CInt(CLng(32767))) +Call ok(getVT(CInt(CLng(32767))) = "VT_I2", "getVT(CInt(CLng(32767))) = " & getVT(CInt(CLng(32767)))) +Call ok(CInt(CSng(32767.49)) = 32767, "CInt(CSng(32767.49)) = " & CInt(CSng(32767.49))) +Call ok(getVT(CInt(CSng(32767.49))) = "VT_I2", "getVT(CInt(CSng(32767.49))) = " & getVT(CInt(CSng(32767.49)))) +Call ok(CInt(-32768.5) = -32768, "CInt(-32768.5) = " & CInt(-32768.5)) +Call ok(getVT(CInt(-32768.5)) = "VT_I2", "getVT(CInt(-32768.5)) = " & getVT(CInt(-32768.5))) +Call ok(CInt(CCur(7.5)) = 8, "CInt(CCur(7.5)) = " & CInt(CCur(7.5))) +Call ok(getVT(CInt(CCur(7.5))) = "VT_I2", "getVT(CInt(CCur(7.5))) = " & getVT(CInt(CCur(7.5)))) +Call ok(CInt(CDate(0)) = 0, "CInt(CDate(0)) = " & CInt(CDate(0))) +Call ok(getVT(CInt(CDate(0))) = "VT_I2", "getVT(CInt(CDate(0))) = " & getVT(CInt(CDate(0)))) +Call ok(CInt(CDate(6.49)) = 6, "CInt(CDate(6.49)) = " & CInt(CDate(6.49))) +Call ok(getVT(CInt(CDate(6.49))) = "VT_I2", "getVT(CInt(CDate(6.49))) = " & getVT(CInt(CDate(6.49)))) +Call ok(CInt("6.5") = 6, "CInt(""6.5"") = " & CInt("6.5")) +Call ok(getVT(CInt("6.5")) = "VT_I2", "getVT(CInt(""6.5"")) = " & getVT(CInt("6.5"))) +Call ok(CInt(True) = -1, "CInt(True) = " & CInt(True)) +Call ok(getVT(CInt(True)) = "VT_I2", "getVT(CInt(True)) = " & getVT(CInt(True))) +Call ok(CInt(False) = 0, "CInt(False) = " & CInt(False)) +Call ok(getVT(CInt(False)) = "VT_I2", "getVT(CInt(False)) = " & getVT(CInt(False))) +Call ok(CInt(CByte(6.51)) = 7, "CInt(CByte(6.51)) = " & CInt(CByte(6.51))) +Call ok(getVT(CInt(CByte(6.51))) = "VT_I2", "getVT(CInt(CByte(6.51))) = " & getVT(CInt(CByte(6.51)))) + +Call ok(CLng(Empty) = 0, "CLng(Empty) = " & CLng(Empty)) +Call ok(getVT(CLng(Empty)) = "VT_I4", "getVT(CLng(Empty)) = " & getVT(CLng(Empty))) +Call ok(CLng(32767) = 32767, "CLng(32767) = " & CLng(32767)) +Call ok(getVT(CLng(32767)) = "VT_I4", "getVT(CLng(32767)) = " & getVT(CLng(32767))) +Call ok(CLng(2147483647) = 2147483647, "CLng(2147483647) = " & CLng(2147483647)) +Call ok(getVT(CLng(2147483647)) = "VT_I4", "getVT(CLng(2147483647)) = " & getVT(CLng(2147483647))) +Call ok(CLng(CSng(32767.12)) = 32767, "CLng(CSng(32767.12)) = " & CLng(CSng(32767.12))) +Call ok(getVT(CLng(CSng(32767.12))) = "VT_I4", "getVT(CLng(CSng(32767.12))) = " & getVT(CLng(CSng(32767.12)))) +Call ok(CLng(-2147483648.5) = -2147483648, "CLng(-2147483648.5) = " & CLng(-2147483648.5)) +Call ok(getVT(CLng(-2147483648.5)) = "VT_I4", "getVT(CLng(-2147483648.5)) = " & getVT(CLng(-2147483648.5))) +Call ok(CLng(CCur(-2147483648)) = -2147483648, "CLng(CCur(-2147483648)) = " & CLng(CCur(-2147483648))) +Call ok(getVT(CLng(CCur(-2147483648))) = "VT_I4", "getVT(CLng(CCur(-2147483648))) = " & getVT(CLng(CCur(-2147483648)))) +Call ok(CLng(CDate(0)) = 0, "CLng(CDate(0)) = " & CLng(CDate(0))) +Call ok(getVT(CLng(CDate(0))) = "VT_I4", "getVT(CLng(CDate(0))) = " & getVT(CLng(CDate(0)))) +Call ok(CLng(CDate(6.49)) = 6, "CLng(CDate(6.49)) = " & CLng(CDate(6.49))) +Call ok(getVT(CLng(CDate(6.49))) = "VT_I4", "getVT(CLng(CDate(6.49))) = " & getVT(CLng(CDate(6.49)))) +Call ok(CLng("6.5") = 6, "CLng(""6.5"") = " & CLng("6.5")) +Call ok(getVT(CLng("6.5")) = "VT_I4", "getVT(CLng(""6.5"")) = " & getVT(CLng("6.5"))) +Call ok(CLng(True) = -1, "CLng(True) = " & CLng(True)) +Call ok(getVT(CLng(True)) = "VT_I4", "getVT(CLng(True)) = " & getVT(CLng(True))) +Call ok(CLng(False) = 0, "CLng(False) = " & CLng(False)) +Call ok(getVT(CLng(False)) = "VT_I4", "getVT(CLng(False)) = " & getVT(CLng(False))) +Call ok(CLng(CByte(6.51)) = 7, "CLng(CByte(6.51)) = " & CLng(CByte(6.51))) +Call ok(getVT(CLng(CByte(6.51))) = "VT_I4", "getVT(CLng(CByte(6.51))) = " & getVT(CLng(CByte(6.51)))) + +Call ok(CSng(Empty) = 0, "CSng(Empty) = " & CSng(Empty)) +Call ok(getVT(CSng(Empty)) = "VT_R4", "getVT(CSng(Empty)) = " & getVT(CSng(Empty))) +Call ok(CSng(0) = 0, "CSng(0) = " & CSng(0)) +Call ok(getVT(CSng(0)) = "VT_R4", "getVT(CSng(0)) = " & getVT(CSng(0))) +Call ok(CSng(CLng(32767)) = 32767, "CSng(CLng(32767)) = " & CSng(CLng(32767))) +Call ok(getVT(CSng(CLng(32767))) = "VT_R4", "getVT(CSng(CLng(32767))) = " & getVT(CSng(CLng(32767)))) +Call ok(CSng(CSng(32767.49)) = 32767.49, "CSng(CSng(32767.49)) = " & CSng(CSng(32767.49))) +Call ok(getVT(CSng(CSng(32767.49))) = "VT_R4", "getVT(CSng(CSng(32767.49))) = " & getVT(CSng(CSng(32767.49)))) +Call ok(CSng(-32768.5) = -32768.5, "CSng(-32768.5) = " & CSng(-32768.5)) +Call ok(getVT(CSng(-32768.5)) = "VT_R4", "getVT(CSng(-32768.5)) = " & getVT(CSng(-32768.5))) +Call ok(CSng(CCur(7.5)) = 7.5, "CSng(CCur(7.5)) = " & CSng(CCur(7.5))) +Call ok(getVT(CSng(CCur(7.5))) = "VT_R4", "getVT(CSng(CCur(7.5))) = " & getVT(CSng(CCur(7.5)))) +Call ok(CSng(CDate(0)) = 0, "CSng(CDate(0)) = " & CSng(CDate(0))) +Call ok(getVT(CSng(CDate(0))) = "VT_R4", "getVT(CSng(CDate(0))) = " & getVT(CSng(CDate(0)))) +Call ok(CSng(CDate(6.49)) = 6.49, "CSng(CDate(6.49)) = " & CSng(CDate(6.49))) +Call ok(getVT(CSng(CDate(6.49))) = "VT_R4", "getVT(CSng(CDate(6.49))) = " & getVT(CSng(CDate(6.49)))) +Call ok(CSng("6.5") = 6.5, "CSng(""6.5"") = " & CSng("6.5")) +Call ok(getVT(CSng("6.5")) = "VT_R4", "getVT(CSng(""6.5"")) = " & getVT(CSng("6.5"))) +Call ok(CSng(True) = -1, "CSng(True) = " & CSng(True)) +Call ok(getVT(CSng(True)) = "VT_R4", "getVT(CSng(True)) = " & getVT(CSng(True))) +Call ok(CSng(False) = 0, "CSng(False) = " & CSng(False)) +Call ok(getVT(CSng(False)) = "VT_R4", "getVT(CSng(False)) = " & getVT(CSng(False))) +Call ok(CSng(CByte(6.51)) = 7, "CSng(CByte(6.51)) = " & CSng(CByte(6.51))) +Call ok(getVT(CSng(CByte(6.51))) = "VT_R4", "getVT(CSng(CByte(6.51))) = " & getVT(CSng(CByte(6.51)))) + +Call ok(CStr(Empty) = "", "CStr(Empty) = " & CStr(Empty)) +Call ok(getVT(CStr(Empty)) = "VT_BSTR", "getVT(CStr(Empty)) = " & getVT(CStr(Empty))) +Call ok(CStr(0) = "0", "CStr(0) = " & CStr(0)) +Call ok(getVT(CStr(0)) = "VT_BSTR", "getVT(CStr(0)) = " & getVT(CStr(0))) +Call ok(CStr(CLng(32767)) = "32767", "CStr(CLng(32767)) = " & CStr(CLng(32767))) +Call ok(getVT(CStr(CLng(32767))) = "VT_BSTR", "getVT(CStr(CLng(32767))) = " & getVT(CStr(CLng(32767)))) +Call ok(CStr(CSng(32767.4)) = "32767.4", "CStr(CSng(32767.4)) = " & CStr(CSng(32767.4))) +Call ok(getVT(CStr(CSng(32767.4))) = "VT_BSTR", "getVT(CStr(CSng(32767.4))) = " & getVT(CStr(CSng(32767.4)))) +Call ok(CStr(-32768.5) = "-32768.5", "CStr(-32768.5) = " & CStr(-32768.5)) +Call ok(getVT(CStr(-32768.5)) = "VT_BSTR", "getVT(CStr(-32768.5)) = " & getVT(CStr(-32768.5))) +Call ok(CStr(CCur(7.5)) = "7.5", "CStr(CCur(7.5)) = " & CStr(CCur(7.5))) +Call ok(getVT(CStr(CCur(7.5))) = "VT_BSTR", "getVT(CStr(CCur(7.5))) = " & getVT(CStr(CCur(7.5)))) +Call ok(CStr(CDate(0.5)) = "12:00:00" Or CStr(CDate(0.5)) = "12:00:00 PM", "CStr(CDate(0.5)) = " & CStr(CDate(0.5))) +Call ok(getVT(CStr(CDate(0.5))) = "VT_BSTR", "getVT(CStr(CDate(0.5))) = " & getVT(CStr(CDate(0.5)))) +Call ok(CStr(CDate(-0.5)) = "12:00:00" Or CStr(CDate(-0.5)) = "12:00:00 PM", "CStr(CDate(-0.5)) = " & CStr(CDate(-0.5))) +Call ok(getVT(CStr(CDate(-0.5))) = "VT_BSTR", "getVT(CStr(CDate(-0.5))) = " & getVT(CStr(CDate(-0.5)))) +Call ok(CStr(CDate(1.5)) = "1899-12-31 12:00:00" Or CStr(CDate(1.5)) = "12/31/1899 12:00:00 PM", "CStr(CDate(1.5)) = " & CStr(CDate(1.5))) +Call ok(getVT(CStr(CDate(1.5))) = "VT_BSTR", "getVT(CStr(CDate(1.5))) = " & getVT(CStr(CDate(1.5)))) +Call ok(CStr(CDate(-1.5)) = "1899-12-29 12:00:00" Or CStr(CDate(-1.5)) = "12/29/1899 12:00:00 PM", "CStr(CDate(-1.5)) = " & CStr(CDate(-1.5))) +Call ok(getVT(CStr(CDate(-1.5))) = "VT_BSTR", "getVT(CStr(CDate(-1.5))) = " & getVT(CStr(CDate(-1.5)))) +Call ok(CStr(True) = "True", "CStr(True) = " & CStr(True)) +Call ok(getVT(CStr(True)) = "VT_BSTR", "getVT(CStr(True)) = " & getVT(CStr(True))) +Call ok(CStr(False) = "False", "CStr(False) = " & CStr(False)) +Call ok(getVT(CStr(False)) = "VT_BSTR", "getVT(CStr(False)) = " & getVT(CStr(False))) +Call ok(CStr(CByte(6.51)) = "7", "CStr(CByte(6.51)) = " & CStr(CByte(6.51))) +Call ok(getVT(CStr(CByte(6.51))) = "VT_BSTR", "getVT(CStr(CByte(6.51))) = " & getVT(CStr(CByte(6.51)))) + Call reportSuccess() diff --git a/dlls/vbscript/tests/run.c b/dlls/vbscript/tests/run.c index b5c3688..ef9db42 100644 --- a/dlls/vbscript/tests/run.c +++ b/dlls/vbscript/tests/run.c @@ -163,8 +163,12 @@ static const char *vt2a(VARIANT *v) return "VT_I2"; case VT_I4: return "VT_I4"; + case VT_R4: + return "VT_R4"; case VT_R8: return "VT_R8"; + case VT_CY: + return "VT_CY"; case VT_DATE: return "VT_DATE"; case VT_BSTR: @@ -177,6 +181,8 @@ static const char *vt2a(VARIANT *v) return "VT_ARRAY|VT_VARIANT"; case VT_ARRAY|VT_BYREF|VT_VARIANT: return "VT_ARRAY|VT_BYREF|VT_VARIANT"; + case VT_UI1: + return "VT_UI1"; default: ok(0, "unknown vt %d\n", V_VT(v)); return NULL; -- 1.8.1.2