diff options
author | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2020-03-09 11:53:50 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-04-02 12:57:57 +0200 |
commit | 84b884135ee419fe7abfefa7b4b651a649cf9ad9 (patch) | |
tree | a5ba5d8e81d832c30099e7fe76764a48caf43f4e /basic/qa | |
parent | 0ec042dd2488989e7a9c45309b408ec8b8326208 (diff) |
tdf#79426, tdf#125180 - Don't convert missing parameters to requested type
If a particular parameter type is requested during the
construction of a parameter list, don't convert missing
parameters to avoid implicit casting to the specified
data type and value of the method.
Missing parameters are handled in StepEMPTY, where
additional information about missing parameters is added.
Change-Id: Ia413b2996d7d1feecedc1dfefaf6baf0fd9d917e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90215
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'basic/qa')
-rw-r--r-- | basic/qa/basic_coverage/test_cverr_method.vb | 20 | ||||
-rw-r--r-- | basic/qa/basic_coverage/test_ismissing_basic.vb | 38 | ||||
-rw-r--r-- | basic/qa/basic_coverage/test_ismissing_compatible.vb | 38 | ||||
-rw-r--r-- | basic/qa/basic_coverage/test_optional_paramters_basic.vb | 36 | ||||
-rw-r--r-- | basic/qa/basic_coverage/test_optional_paramters_compatible.vb | 38 | ||||
-rw-r--r-- | basic/qa/vba_tests/cverr.vb | 11 | ||||
-rw-r--r-- | basic/qa/vba_tests/ismissing.vb | 36 | ||||
-rw-r--r-- | basic/qa/vba_tests/optional_paramters.vb | 36 |
8 files changed, 104 insertions, 149 deletions
diff --git a/basic/qa/basic_coverage/test_cverr_method.vb b/basic/qa/basic_coverage/test_cverr_method.vb index b1c3f8bec51c..f74445c20c6a 100644 --- a/basic/qa/basic_coverage/test_cverr_method.vb +++ b/basic/qa/basic_coverage/test_cverr_method.vb @@ -13,4 +13,24 @@ Function doUnitTest as Integer Else doUnitTest = 1 End If + + ' tdf#79426 - passing an error object to a function + if ( TestCVErr( CVErr( 2 ) ) <> 2 ) Then + doUnitTest = 0 + Else + doUnitTest = 1 + End If + + ' tdf#79426 - test with Error-Code 448 ( ERRCODE_BASIC_NAMED_NOT_FOUND ) + if ( TestCVErr( CVErr( 448 ) ) <> 448 ) Then + doUnitTest = 0 + Else + doUnitTest = 1 + End If End Function + +Function TestCVErr(vErr As Variant) + Dim nValue As Integer + nValue = vErr + TestCVErr = nValue +End Function
\ No newline at end of file diff --git a/basic/qa/basic_coverage/test_ismissing_basic.vb b/basic/qa/basic_coverage/test_ismissing_basic.vb index 8705220e26d4..b838ce718c36 100644 --- a/basic/qa/basic_coverage/test_ismissing_basic.vb +++ b/basic/qa/basic_coverage/test_ismissing_basic.vb @@ -25,63 +25,55 @@ Function verify_testIsMissingBasic() As String failCount = 0 result = "Test Results" & Chr$(10) & "============" & Chr$(10) - testName = "Test optionals (Basic)" + testName = "Test missing (Basic)" On Error GoTo errorHandler ' optionals with variant datatypes TestLog_ASSERT TestOptVariant(), IsMissingAB, "TestOptVariant()" TestLog_ASSERT TestOptVariant(123), IsMissingB, "TestOptVariant(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptVariant(, 456), IsMissingA, "TestOptVariant(, 456)" + TestLog_ASSERT TestOptVariant(, 456), IsMissingA, "TestOptVariant(, 456)" TestLog_ASSERT TestOptVariant(123, 456), IsMissingNone, "TestOptVariant(123, 456)" ' optionals with variant datatypes (ByRef and ByVal) TestLog_ASSERT TestOptVariantByRefByVal(), IsMissingAB, "TestOptVariantByRefByVal()" TestLog_ASSERT TestOptVariantByRefByVal(123), IsMissingB, "TestOptVariantByRefByVal(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptVariantByRefByVal(, 456), IsMissingA, "TestOptVariantByRefByVal(, 456)" + TestLog_ASSERT TestOptVariantByRefByVal(, 456), IsMissingA, "TestOptVariantByRefByVal(, 456)" TestLog_ASSERT TestOptVariantByRefByVal(123, 456), IsMissingNone, "TestOptVariantByRefByVal(123, 456)" ' optionals with double datatypes TestLog_ASSERT TestOptDouble(), IsMissingAB, "TestOptDouble()" TestLog_ASSERT TestOptDouble(123.4), IsMissingB, "TestOptDouble(123.4)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptDouble(, 567.8), IsMissingA, "TestOptDouble(, 567.8)" + TestLog_ASSERT TestOptDouble(, 567.8), IsMissingA, "TestOptDouble(, 567.8)" TestLog_ASSERT TestOptDouble(123.4, 567.8), IsMissingNone, "TestOptDouble(123.4, 567.8)" ' optionals with double datatypes (ByRef and ByVal) TestLog_ASSERT TestOptDoubleByRefByVal(), IsMissingAB, "TestOptDouble()" TestLog_ASSERT TestOptDoubleByRefByVal(123.4), IsMissingB, "TestOptDouble(123.4)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptDoubleByRefByVal(, 567.8), IsMissingA, "TestOptDoubleByRefByVal(, 567.8)" + TestLog_ASSERT TestOptDoubleByRefByVal(, 567.8), IsMissingA, "TestOptDoubleByRefByVal(, 567.8)" TestLog_ASSERT TestOptDoubleByRefByVal(123.4, 567.8), IsMissingNone, "TestOptDoubleByRefByVal(123.4, 567.8)" ' optionals with integer datatypes TestLog_ASSERT TestOptInteger(), IsMissingAB, "TestOptInteger()" TestLog_ASSERT TestOptInteger(123), IsMissingB, "TestOptInteger(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptInteger(, 456), IsMissingA, "TestOptInteger(, 456)" + TestLog_ASSERT TestOptInteger(, 456), IsMissingA, "TestOptInteger(, 456)" TestLog_ASSERT TestOptInteger(123, 456), IsMissingNone, "TestOptInteger(123, 456)" ' optionals with integer datatypes (ByRef and ByVal) TestLog_ASSERT TestOptIntegerByRefByVal(), IsMissingAB, "TestOptIntegerByRefByVal()" TestLog_ASSERT TestOptIntegerByRefByVal(123), IsMissingB, "TestOptIntegerByRefByVal(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptIntegerByRefByVal(, 456), IsMissingA, "TestOptIntegerByRefByVal(, 456)" + TestLog_ASSERT TestOptIntegerByRefByVal(, 456), IsMissingA, "TestOptIntegerByRefByVal(, 456)" TestLog_ASSERT TestOptIntegerByRefByVal(123, 456), IsMissingNone, "TestOptIntegerByRefByVal(123, 456)" ' optionals with string datatypes TestLog_ASSERT TestOptString(), IsMissingAB, "TestOptString()" TestLog_ASSERT TestOptString("123"), IsMissingB, "TestOptString(""123"")" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptString(, "456"), IsMissingA, "TestOptString(, ""456"")" + TestLog_ASSERT TestOptString(, "456"), IsMissingA, "TestOptString(, ""456"")" TestLog_ASSERT TestOptString("123", "456"), IsMissingNone, "TestOptString(""123"", ""456"")" ' optionals with string datatypes (ByRef and ByVal) TestLog_ASSERT TestOptStringByRefByVal(), IsMissingAB, "TestOptStringByRefByVal()" TestLog_ASSERT TestOptStringByRefByVal("123"), IsMissingB, "TestOptStringByRefByVal(""123"")" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptStringByRefByVal(, "456"), IsMissingA, "TestOptStringByRefByVal(, ""456"")" + TestLog_ASSERT TestOptStringByRefByVal(, "456"), IsMissingA, "TestOptStringByRefByVal(, ""456"")" TestLog_ASSERT TestOptStringByRefByVal("123", "456"), IsMissingNone, "TestOptStringByRefByVal(""123"", ""456"")" ' optionals with object datatypes @@ -93,15 +85,13 @@ Function verify_testIsMissingBasic() As String cB.Add (567.8) TestLog_ASSERT TestOptObject(), IsMissingAB, "TestOptObject()" TestLog_ASSERT TestOptObject(cA), IsMissingB, "TestOptObject(A)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptObject(, cB), IsMissingA, "TestOptObject(, B)" + TestLog_ASSERT TestOptObject(, cB), IsMissingA, "TestOptObject(, B)" TestLog_ASSERT TestOptObject(cA, cB), IsMissingNone, "TestOptObject(A, B)" ' optionals with object datatypes (ByRef and ByVal) TestLog_ASSERT TestOptObjectByRefByVal(), IsMissingAB, "TestOptObjectByRefByVal()" TestLog_ASSERT TestOptObjectByRefByVal(cA), IsMissingB, "TestOptObjectByRefByVal(A)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptObjectByRefByVal(, cB), IsMissingA, "TestOptObjectByRefByVal(, B)" + TestLog_ASSERT TestOptObjectByRefByVal(, cB), IsMissingA, "TestOptObjectByRefByVal(, B)" TestLog_ASSERT TestOptObjectByRefByVal(cA, cB), IsMissingNone, "TestOptObjectByRefByVal(A, B)" ' optionals with array datatypes @@ -113,15 +103,13 @@ Function verify_testIsMissingBasic() As String aB(1) = 567.8 TestLog_ASSERT TestOptArray(), IsMissingAB, "TestOptArray()" TestLog_ASSERT TestOptArray(aA), IsMissingB, "TestOptArray(A)" - ' TODO - tdf#125180 for more details - 'TestLog_ASSERT TestOptArray(, aB), IsMissingA, "TestOptArray(, B)" + TestLog_ASSERT TestOptArray(, aB), IsMissingA, "TestOptArray(, B)" TestLog_ASSERT TestOptArray(aA, aB), IsMissingNone, "TestOptArray(A, B)" ' optionals with array datatypes (ByRef and ByVal) TestLog_ASSERT TestOptArrayByRefByVal(), IsMissingAB, "TestOptArrayByRefByVal()" TestLog_ASSERT TestOptArrayByRefByVal(aA), IsMissingB, "TestOptArrayByRefByVal(A)" - ' TODO - tdf#125180 for more details - 'TestLog_ASSERT TestOptArrayByRefByVal(, aB), IsMissingA, "TestOptArrayByRefByVal(, B)" + TestLog_ASSERT TestOptArrayByRefByVal(, aB), IsMissingA, "TestOptArrayByRefByVal(, B)" TestLog_ASSERT TestOptArrayByRefByVal(aA, aB), IsMissingNone, "TestOptArrayByRefByVal(A, B)" result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10) diff --git a/basic/qa/basic_coverage/test_ismissing_compatible.vb b/basic/qa/basic_coverage/test_ismissing_compatible.vb index 13f076d5bc30..dbe2a815d25d 100644 --- a/basic/qa/basic_coverage/test_ismissing_compatible.vb +++ b/basic/qa/basic_coverage/test_ismissing_compatible.vb @@ -28,63 +28,55 @@ Function verify_testIsMissingCompatible() As String failCount = 0 result = "Test Results" & Chr$(10) & "============" & Chr$(10) - testName = "Test optionals (Basic)" + testName = "Test missing (Compatible)" On Error GoTo errorHandler ' optionals with variant datatypes TestLog_ASSERT TestOptVariant(), IsMissingA, "TestOptVariant()" TestLog_ASSERT TestOptVariant(123), IsMissingNone, "TestOptVariant(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptVariant(, 456), IsMissingA, "TestOptVariant(, 456)" + TestLog_ASSERT TestOptVariant(, 456), IsMissingA, "TestOptVariant(, 456)" TestLog_ASSERT TestOptVariant(123, 456), IsMissingNone, "TestOptVariant(123, 456)" ' optionals with variant datatypes (ByRef and ByVal) TestLog_ASSERT TestOptVariantByRefByVal(), IsMissingA, "TestOptVariantByRefByVal()" TestLog_ASSERT TestOptVariantByRefByVal(123), IsMissingNone, "TestOptVariantByRefByVal(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptVariantByRefByVal(, 456), IsMissingA, "TestOptVariantByRefByVal(, 456)" + TestLog_ASSERT TestOptVariantByRefByVal(, 456), IsMissingA, "TestOptVariantByRefByVal(, 456)" TestLog_ASSERT TestOptVariantByRefByVal(123, 456), IsMissingNone, "TestOptVariantByRefByVal(123, 456)" ' optionals with double datatypes TestLog_ASSERT TestOptDouble(), IsMissingA, "TestOptDouble()" TestLog_ASSERT TestOptDouble(123.4), IsMissingNone, "TestOptDouble(123.4)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptDouble(, 567.8), IsMissingA, "TestOptDouble(, 567.8)" + TestLog_ASSERT TestOptDouble(, 567.8), IsMissingA, "TestOptDouble(, 567.8)" TestLog_ASSERT TestOptDouble(123.4, 567.8), IsMissingNone, "TestOptDouble(123.4, 567.8)" ' optionals with double datatypes (ByRef and ByVal) TestLog_ASSERT TestOptDoubleByRefByVal(), IsMissingA, "TestOptDouble()" TestLog_ASSERT TestOptDoubleByRefByVal(123.4), IsMissingNone, "TestOptDouble(123.4)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptDoubleByRefByVal(, 567.8), IsMissingA, "TestOptDoubleByRefByVal(, 567.8)" + TestLog_ASSERT TestOptDoubleByRefByVal(, 567.8), IsMissingA, "TestOptDoubleByRefByVal(, 567.8)" TestLog_ASSERT TestOptDoubleByRefByVal(123.4, 567.8), IsMissingNone, "TestOptDoubleByRefByVal(123.4, 567.8)" ' optionals with integer datatypes TestLog_ASSERT TestOptInteger(), IsMissingA, "TestOptInteger()" TestLog_ASSERT TestOptInteger(123), IsMissingNone, "TestOptInteger(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptInteger(, 456), IsMissingA, "TestOptInteger(, 456)" + TestLog_ASSERT TestOptInteger(, 456), IsMissingA, "TestOptInteger(, 456)" TestLog_ASSERT TestOptInteger(123, 456), IsMissingNone, "TestOptInteger(123, 456)" ' optionals with integer datatypes (ByRef and ByVal) TestLog_ASSERT TestOptIntegerByRefByVal(), IsMissingA, "TestOptIntegerByRefByVal()" TestLog_ASSERT TestOptIntegerByRefByVal(123), IsMissingNone, "TestOptIntegerByRefByVal(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptIntegerByRefByVal(, 456), IsMissingA, "TestOptIntegerByRefByVal(, 456)" + TestLog_ASSERT TestOptIntegerByRefByVal(, 456), IsMissingA, "TestOptIntegerByRefByVal(, 456)" TestLog_ASSERT TestOptIntegerByRefByVal(123, 456), IsMissingNone, "TestOptIntegerByRefByVal(123, 456)" ' optionals with string datatypes TestLog_ASSERT TestOptString(), IsMissingA, "TestOptString()" TestLog_ASSERT TestOptString("123"), IsMissingNone, "TestOptString(""123"")" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptString(, "456"), IsMissingA, "TestOptString(, ""456"")" + TestLog_ASSERT TestOptString(, "456"), IsMissingA, "TestOptString(, ""456"")" TestLog_ASSERT TestOptString("123", "456"), IsMissingNone, "TestOptString(""123"", ""456"")" ' optionals with string datatypes (ByRef and ByVal) TestLog_ASSERT TestOptStringByRefByVal(), IsMissingA, "TestOptStringByRefByVal()" TestLog_ASSERT TestOptStringByRefByVal("123"), IsMissingNone, "TestOptStringByRefByVal(""123"")" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptStringByRefByVal(, "456"), IsMissingA, "TestOptStringByRefByVal(, ""456"")" + TestLog_ASSERT TestOptStringByRefByVal(, "456"), IsMissingA, "TestOptStringByRefByVal(, ""456"")" TestLog_ASSERT TestOptStringByRefByVal("123", "456"), IsMissingNone, "TestOptStringByRefByVal(""123"", ""456"")" ' optionals with object datatypes @@ -96,15 +88,13 @@ Function verify_testIsMissingCompatible() As String cB.Add (567.8) TestLog_ASSERT TestOptObject(), IsMissingAB, "TestOptObject()" TestLog_ASSERT TestOptObject(cA), IsMissingB, "TestOptObject(A)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptObject(, cB), IsMissingA, "TestOptObject(, B)" + TestLog_ASSERT TestOptObject(, cB), IsMissingA, "TestOptObject(, B)" TestLog_ASSERT TestOptObject(cA, cB), IsMissingNone, "TestOptObject(A, B)" ' optionals with object datatypes (ByRef and ByVal) TestLog_ASSERT TestOptObjectByRefByVal(), IsMissingAB, "TestOptObjectByRefByVal()" TestLog_ASSERT TestOptObjectByRefByVal(cA), IsMissingB, "TestOptObjectByRefByVal(A)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptObjectByRefByVal(, cB), IsMissingA, "TestOptObjectByRefByVal(, B)" + TestLog_ASSERT TestOptObjectByRefByVal(, cB), IsMissingA, "TestOptObjectByRefByVal(, B)" TestLog_ASSERT TestOptObjectByRefByVal(cA, cB), IsMissingNone, "TestOptObjectByRefByVal(A, B)" ' optionals with array datatypes @@ -116,15 +106,13 @@ Function verify_testIsMissingCompatible() As String aB(1) = 567.8 TestLog_ASSERT TestOptArray(), IsMissingAB, "TestOptArray()" TestLog_ASSERT TestOptArray(aA), IsMissingB, "TestOptArray(A)" - ' TODO - tdf#125180 for more details - 'TestLog_ASSERT TestOptArray(, aB), IsMissingA, "TestOptArray(, B)" + TestLog_ASSERT TestOptArray(, aB), IsMissingA, "TestOptArray(, B)" TestLog_ASSERT TestOptArray(aA, aB), IsMissingNone, "TestOptArray(A, B)" ' optionals with array datatypes (ByRef and ByVal) TestLog_ASSERT TestOptArrayByRefByVal(), IsMissingAB, "TestOptArrayByRefByVal()" TestLog_ASSERT TestOptArrayByRefByVal(aA), IsMissingB, "TestOptArrayByRefByVal(A)" - ' TODO - tdf#125180 for more details - 'TestLog_ASSERT TestOptArrayByRefByVal(, aB), IsMissingA, "TestOptArrayByRefByVal(, B)" + TestLog_ASSERT TestOptArrayByRefByVal(, aB), IsMissingA, "TestOptArrayByRefByVal(, B)" TestLog_ASSERT TestOptArrayByRefByVal(aA, aB), IsMissingNone, "TestOptArrayByRefByVal(A, B)" result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10) diff --git a/basic/qa/basic_coverage/test_optional_paramters_basic.vb b/basic/qa/basic_coverage/test_optional_paramters_basic.vb index d260246508de..39aeb62b27a4 100644 --- a/basic/qa/basic_coverage/test_optional_paramters_basic.vb +++ b/basic/qa/basic_coverage/test_optional_paramters_basic.vb @@ -27,57 +27,49 @@ Function verify_testOptionalsBasic() As String ' optionals with variant datatypes TestLog_ASSERT TestOptVariant(), 0, "TestOptVariant()" TestLog_ASSERT TestOptVariant(123), 123, "TestOptVariant(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptVariant(, 456), 456, "TestOptVariant(, 456)" + TestLog_ASSERT TestOptVariant(, 456), 456, "TestOptVariant(, 456)" TestLog_ASSERT TestOptVariant(123, 456), 579, "TestOptVariant(123, 456)" ' optionals with variant datatypes (ByRef and ByVal) TestLog_ASSERT TestOptVariantByRefByVal(), 0, "TestOptVariantByRefByVal()" TestLog_ASSERT TestOptVariantByRefByVal(123), 123, "TestOptVariantByRefByVal(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptVariantByRefByVal(, 456), 456, "TestOptVariantByRefByVal(, 456)" + TestLog_ASSERT TestOptVariantByRefByVal(, 456), 456, "TestOptVariantByRefByVal(, 456)" TestLog_ASSERT TestOptVariantByRefByVal(123, 456), 579, "TestOptVariantByRefByVal(123, 456)" ' optionals with double datatypes TestLog_ASSERT TestOptDouble(), 0, "TestOptDouble()" TestLog_ASSERT TestOptDouble(123.4), 123.4, "TestOptDouble(123.4)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptDouble(, 567.8), 567.8, "TestOptDouble(, 567.8)" + TestLog_ASSERT TestOptDouble(, 567.8), 567.8, "TestOptDouble(, 567.8)" TestLog_ASSERT Format(TestOptDouble(123.4, 567.8), "0.0"), 691.2, "TestOptDouble(123.4, 567.8)" ' optionals with double datatypes (ByRef and ByVal) TestLog_ASSERT TestOptDoubleByRefByVal(), 0, "TestOptDouble()" TestLog_ASSERT TestOptDoubleByRefByVal(123.4), 123.4, "TestOptDouble(123.4)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptDoubleByRefByVal(, 567.8), 567.8, "TestOptDoubleByRefByVal(, 567.8)" + TestLog_ASSERT TestOptDoubleByRefByVal(, 567.8), 567.8, "TestOptDoubleByRefByVal(, 567.8)" TestLog_ASSERT Format(TestOptDoubleByRefByVal(123.4, 567.8), "0.0"), 691.2, "TestOptDoubleByRefByVal(123.4, 567.8)" ' optionals with integer datatypes TestLog_ASSERT TestOptInteger(), 0, "TestOptInteger()" TestLog_ASSERT TestOptInteger(123), 123, "TestOptInteger(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptInteger(, 456), 456, "TestOptInteger(, 456)" + TestLog_ASSERT TestOptInteger(, 456), 456, "TestOptInteger(, 456)" TestLog_ASSERT TestOptInteger(123, 456), 579, "TestOptInteger(123, 456)" ' optionals with integer datatypes (ByRef and ByVal) TestLog_ASSERT TestOptIntegerByRefByVal(), 0, "TestOptIntegerByRefByVal()" TestLog_ASSERT TestOptIntegerByRefByVal(123), 123, "TestOptIntegerByRefByVal(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptIntegerByRefByVal(, 456), 456, "TestOptIntegerByRefByVal(, 456)" + TestLog_ASSERT TestOptIntegerByRefByVal(, 456), 456, "TestOptIntegerByRefByVal(, 456)" TestLog_ASSERT TestOptIntegerByRefByVal(123, 456), 579, "TestOptIntegerByRefByVal(123, 456)" ' optionals with string datatypes TestLog_ASSERT TestOptString(), "", "TestOptString()" TestLog_ASSERT TestOptString("123"), "123", "TestOptString(""123"")" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptString(, "456"), "456", "TestOptString(, ""456"")" + TestLog_ASSERT TestOptString(, "456"), "456", "TestOptString(, ""456"")" TestLog_ASSERT TestOptString("123", "456"), "123456", "TestOptString(""123"", ""456"")" ' optionals with string datatypes (ByRef and ByVal) TestLog_ASSERT TestOptStringByRefByVal(), "", "TestOptStringByRefByVal()" TestLog_ASSERT TestOptStringByRefByVal("123"), "123", "TestOptStringByRefByVal(""123"")" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptStringByRefByVal(, "456"), "456", "TestOptStringByRefByVal(, ""456"")" + TestLog_ASSERT TestOptStringByRefByVal(, "456"), "456", "TestOptStringByRefByVal(, ""456"")" TestLog_ASSERT TestOptStringByRefByVal("123", "456"), "123456", "TestOptStringByRefByVal(""123"", ""456"")" ' optionals with object datatypes @@ -89,15 +81,13 @@ Function verify_testOptionalsBasic() As String cB.Add (567.8) TestLog_ASSERT TestOptObject(), 0, "TestOptObject()" TestLog_ASSERT TestOptObject(cA), 579, "TestOptObject(A)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT Format(TestOptObject(, cB), "0.0"), 691.2, "TestOptObject(, B)" + TestLog_ASSERT Format(TestOptObject(, cB), "0.0"), 691.2, "TestOptObject(, B)" TestLog_ASSERT Format(TestOptObject(cA, cB), "0.0"), 1270.2, "TestOptObject(A, B)" ' optionals with object datatypes (ByRef and ByVal) TestLog_ASSERT TestOptObjectByRefByVal(), 0, "TestOptObjectByRefByVal()" TestLog_ASSERT TestOptObjectByRefByVal(cA), 579, "TestOptObjectByRefByVal(A)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT Format(TestOptObjectByRefByVal(, cB), "0.0"), 691.2, "TestOptObjectByRefByVal(, B)" + TestLog_ASSERT Format(TestOptObjectByRefByVal(, cB), "0.0"), 691.2, "TestOptObjectByRefByVal(, B)" TestLog_ASSERT Format(TestOptObjectByRefByVal(cA, cB), "0.0"), 1270.2, "TestOptObjectByRefByVal(A, B)" ' optionals with array datatypes @@ -109,15 +99,13 @@ Function verify_testOptionalsBasic() As String aB(1) = 567.8 TestLog_ASSERT TestOptArray(), 0, "TestOptArray()" TestLog_ASSERT TestOptArray(aA), 579, "TestOptArray(A)" - ' TODO - tdf#125180 for more details - 'TestLog_ASSERT Format(TestOptArray(, aB), "0.0"), 691.2, "TestOptArray(, B)" + TestLog_ASSERT Format(TestOptArray(, aB), "0.0"), 691.2, "TestOptArray(, B)" TestLog_ASSERT Format(TestOptArray(aA, aB), "0.0"), 1270.2, "TestOptArray(A, B)" ' optionals with array datatypes (ByRef and ByVal) TestLog_ASSERT TestOptArrayByRefByVal(), 0, "TestOptArrayByRefByVal()" TestLog_ASSERT TestOptArrayByRefByVal(aA), 579, "TestOptArrayByRefByVal(A)" - ' TODO - tdf#125180 for more details - 'TestLog_ASSERT Format(TestOptArrayByRefByVal(, aB), "0.0"), 691.2, "TestOptArrayByRefByVal(, B)" + TestLog_ASSERT Format(TestOptArrayByRefByVal(, aB), "0.0"), 691.2, "TestOptArrayByRefByVal(, B)" TestLog_ASSERT Format(TestOptArrayByRefByVal(aA, aB), "0.0"), 1270.2, "TestOptArrayByRefByVal(A, B)" result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10) diff --git a/basic/qa/basic_coverage/test_optional_paramters_compatible.vb b/basic/qa/basic_coverage/test_optional_paramters_compatible.vb index 5cbaeab258ad..15bfe77b827a 100644 --- a/basic/qa/basic_coverage/test_optional_paramters_compatible.vb +++ b/basic/qa/basic_coverage/test_optional_paramters_compatible.vb @@ -23,65 +23,57 @@ Function verify_testOptionalsCompatible() As String failCount = 0 result = "Test Results" & Chr$(10) & "============" & Chr$(10) - testName = "Test optionals (Basic)" + testName = "Test optionals (Compatible)" On Error GoTo errorHandler ' optionals with variant datatypes ' TODO - New bug report? Scanner initializes variable as String. Function returns "123" ' TestLog_ASSERT TestOptVariant(), 123, "TestOptVariant()" TestLog_ASSERT TestOptVariant(123), 246, "TestOptVariant(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptVariant(, 456), 456, "TestOptVariant(, 456)" + TestLog_ASSERT TestOptVariant(, 456), 456, "TestOptVariant(, 456)" TestLog_ASSERT TestOptVariant(123, 456), 579, "TestOptVariant(123, 456)" ' optionals with variant datatypes (ByRef and ByVal) ' TODO - New bug report? Scanner initializes variable as String. Function returns "123" ' TestLog_ASSERT TestOptVariantByRefByVal(), 123, "TestOptVariantByRefByVal()" TestLog_ASSERT TestOptVariantByRefByVal(123), 246, "TestOptVariantByRefByVal(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptVariantByRefByVal(, 456), 456, "TestOptVariantByRefByVal(, 456)" + TestLog_ASSERT TestOptVariantByRefByVal(, 456), 456, "TestOptVariantByRefByVal(, 456)" TestLog_ASSERT TestOptVariantByRefByVal(123, 456), 579, "TestOptVariantByRefByVal(123, 456)" ' optionals with double datatypes TestLog_ASSERT TestOptDouble(), 123.4, "TestOptDouble()" TestLog_ASSERT TestOptDouble(123.4), 246.8, "TestOptDouble(123.4)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptDouble(, 567.8), 567.8, "TestOptDouble(, 567.8)" + TestLog_ASSERT TestOptDouble(, 567.8), 567.8, "TestOptDouble(, 567.8)" TestLog_ASSERT Format(TestOptDouble(123.4, 567.8), "0.0"), 691.2, "TestOptDouble(123.4, 567.8)" ' optionals with double datatypes (ByRef and ByVal) TestLog_ASSERT TestOptDoubleByRefByVal(), 123.4, "TestOptDouble()" TestLog_ASSERT TestOptDoubleByRefByVal(123.4), 246.8, "TestOptDouble(123.4)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptDoubleByRefByVal(, 567.8), 567.8, "TestOptDoubleByRefByVal(, 567.8)" + TestLog_ASSERT TestOptDoubleByRefByVal(, 567.8), 567.8, "TestOptDoubleByRefByVal(, 567.8)" TestLog_ASSERT Format(TestOptDoubleByRefByVal(123.4, 567.8), "0.0"), 691.2, "TestOptDoubleByRefByVal(123.4, 567.8)" ' optionals with integer datatypes TestLog_ASSERT TestOptInteger(), 123, "TestOptInteger()" TestLog_ASSERT TestOptInteger(123), 246, "TestOptInteger(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptInteger(, 456), 456, "TestOptInteger(, 456)" + TestLog_ASSERT TestOptInteger(, 456), 456, "TestOptInteger(, 456)" TestLog_ASSERT TestOptInteger(123, 456), 579, "TestOptInteger(123, 456)" ' optionals with integer datatypes (ByRef and ByVal) TestLog_ASSERT TestOptIntegerByRefByVal(), 123, "TestOptIntegerByRefByVal()" TestLog_ASSERT TestOptIntegerByRefByVal(123), 246, "TestOptIntegerByRefByVal(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptIntegerByRefByVal(, 456), 456, "TestOptIntegerByRefByVal(, 456)" + TestLog_ASSERT TestOptIntegerByRefByVal(, 456), 456, "TestOptIntegerByRefByVal(, 456)" TestLog_ASSERT TestOptIntegerByRefByVal(123, 456), 579, "TestOptIntegerByRefByVal(123, 456)" ' optionals with string datatypes TestLog_ASSERT TestOptString(), "123", "TestOptString()" TestLog_ASSERT TestOptString("123"), "123123", "TestOptString(""123"")" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptString(, "456"), "456", "TestOptString(, ""456"")" + TestLog_ASSERT TestOptString(, "456"), "456", "TestOptString(, ""456"")" TestLog_ASSERT TestOptString("123", "456"), "123456", "TestOptString(""123"", ""456"")" ' optionals with string datatypes (ByRef and ByVal) TestLog_ASSERT TestOptStringByRefByVal(), "123", "TestOptStringByRefByVal()" TestLog_ASSERT TestOptStringByRefByVal("123"), "123123", "TestOptStringByRefByVal(""123"")" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptStringByRefByVal(, "456"), "456", "TestOptStringByRefByVal(, ""456"")" + TestLog_ASSERT TestOptStringByRefByVal(, "456"), "456", "TestOptStringByRefByVal(, ""456"")" TestLog_ASSERT TestOptStringByRefByVal("123", "456"), "123456", "TestOptStringByRefByVal(""123"", ""456"")" ' optionals with object datatypes @@ -93,15 +85,13 @@ Function verify_testOptionalsCompatible() As String cB.Add (567.8) TestLog_ASSERT TestOptObject(), 0, "TestOptObject()" TestLog_ASSERT TestOptObject(cA), 579, "TestOptObject(A)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT Format(TestOptObject(, cB), "0.0"), 691.2, "TestOptObject(, B)" + TestLog_ASSERT Format(TestOptObject(, cB), "0.0"), 691.2, "TestOptObject(, B)" TestLog_ASSERT Format(TestOptObject(cA, cB), "0.0"), 1270.2, "TestOptObject(A, B)" ' optionals with object datatypes (ByRef and ByVal) TestLog_ASSERT TestOptObjectByRefByVal(), 0, "TestOptObjectByRefByVal()" TestLog_ASSERT TestOptObjectByRefByVal(cA), 579, "TestOptObjectByRefByVal(A)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT Format(TestOptObjectByRefByVal(, cB), "0.0"), 691.2, "TestOptObjectByRefByVal(, B)" + TestLog_ASSERT Format(TestOptObjectByRefByVal(, cB), "0.0"), 691.2, "TestOptObjectByRefByVal(, B)" TestLog_ASSERT Format(TestOptObjectByRefByVal(cA, cB), "0.0"), 1270.2, "TestOptObjectByRefByVal(A, B)" ' optionals with array datatypes @@ -113,15 +103,13 @@ Function verify_testOptionalsCompatible() As String aB(1) = 567.8 TestLog_ASSERT TestOptArray(), 0, "TestOptArray()" TestLog_ASSERT TestOptArray(aA), 579, "TestOptArray(A)" - ' TODO - tdf#125180 for more details - 'TestLog_ASSERT Format(TestOptArray(, aB), "0.0"), 691.2, "TestOptArray(, B)" + TestLog_ASSERT Format(TestOptArray(, aB), "0.0"), 691.2, "TestOptArray(, B)" TestLog_ASSERT Format(TestOptArray(aA, aB), "0.0"), 1270.2, "TestOptArray(A, B)" ' optionals with array datatypes (ByRef and ByVal) TestLog_ASSERT TestOptArrayByRefByVal(), 0, "TestOptArrayByRefByVal()" TestLog_ASSERT TestOptArrayByRefByVal(aA), 579, "TestOptArrayByRefByVal(A)" - ' TODO - tdf#125180 for more details - 'TestLog_ASSERT Format(TestOptArrayByRefByVal(, aB), "0.0"), 691.2, "TestOptArrayByRefByVal(, B)" + TestLog_ASSERT Format(TestOptArrayByRefByVal(, aB), "0.0"), 691.2, "TestOptArrayByRefByVal(, B)" TestLog_ASSERT Format(TestOptArrayByRefByVal(aA, aB), "0.0"), 1270.2, "TestOptArrayByRefByVal(A, B)" result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10) diff --git a/basic/qa/vba_tests/cverr.vb b/basic/qa/vba_tests/cverr.vb index 11707ba2517c..4aa646ae87a8 100644 --- a/basic/qa/vba_tests/cverr.vb +++ b/basic/qa/vba_tests/cverr.vb @@ -59,6 +59,11 @@ Function verify_testCVErr() As String date1 = CStr(CVErr(xlErrValue)) TestLog_ASSERT date1 = date2, "the return CVErr is: " & date1 + ' tdf#79426 - passing an error object to a function + TestLog_ASSERT TestCVErr( CVErr( 2 ) ) = 2 + ' tdf#79426 - test with Error-Code 448 ( ERRCODE_BASIC_NAMED_NOT_FOUND ) + TestLog_ASSERT TestCVErr( CVErr( 448 ) ) = 448 + result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10) verify_testCVErr = result @@ -67,6 +72,12 @@ errorHandler: TestLog_ASSERT (False), testName & ": hit error handler" End Function +Function TestCVErr(vErr As Variant) + Dim nValue As Integer + nValue = vErr + TestCVErr = nValue +End Function + Sub TestLog_ASSERT(assertion As Boolean, Optional testId As String, Optional testComment As String) If assertion = True Then diff --git a/basic/qa/vba_tests/ismissing.vb b/basic/qa/vba_tests/ismissing.vb index 1adc73441c22..623c153d4d72 100644 --- a/basic/qa/vba_tests/ismissing.vb +++ b/basic/qa/vba_tests/ismissing.vb @@ -29,63 +29,55 @@ Function verify_testIsMissingVba() As String failCount = 0 result = "Test Results" & Chr$(10) & "============" & Chr$(10) - testName = "Test optionals (Basic)" + testName = "Test missing (VBA)" On Error GoTo errorHandler ' optionals with variant datatypes TestLog_ASSERT TestOptVariant(), IsMissingA, "TestOptVariant()" TestLog_ASSERT TestOptVariant(123), IsMissingNone, "TestOptVariant(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptVariant(, 456), IsMissingNone, "TestOptVariant(, 456)" + TestLog_ASSERT TestOptVariant(, 456), IsMissingA, "TestOptVariant(, 456)" TestLog_ASSERT TestOptVariant(123, 456), IsMissingNone, "TestOptVariant(123, 456)" ' optionals with variant datatypes (ByRef and ByVal) TestLog_ASSERT TestOptVariantByRefByVal(), IsMissingA, "TestOptVariantByRefByVal()" TestLog_ASSERT TestOptVariantByRefByVal(123),IsMissingNone, "TestOptVariantByRefByVal(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptVariantByRefByVal(, 456), IsMissingNone, "TestOptVariantByRefByVal(, 456)" + TestLog_ASSERT TestOptVariantByRefByVal(, 456), IsMissingA, "TestOptVariantByRefByVal(, 456)" TestLog_ASSERT TestOptVariantByRefByVal(123, 456), IsMissingNone, "TestOptVariantByRefByVal(123, 456)" ' optionals with double datatypes TestLog_ASSERT TestOptDouble(), IsMissingNone, "TestOptDouble()" TestLog_ASSERT TestOptDouble(123.4), IsMissingNone, "TestOptDouble(123.4)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptDouble(, 567.8), IsMissingNone, "TestOptDouble(, 567.8)" + TestLog_ASSERT TestOptDouble(, 567.8), IsMissingNone, "TestOptDouble(, 567.8)" TestLog_ASSERT TestOptDouble(123.4, 567.8), IsMissingNone, "TestOptDouble(123.4, 567.8)" ' optionals with double datatypes (ByRef and ByVal) TestLog_ASSERT TestOptDoubleByRefByVal(), IsMissingNone, "TestOptDouble()" TestLog_ASSERT TestOptDoubleByRefByVal(123.4), IsMissingNone, "TestOptDouble(123.4)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptDoubleByRefByVal(, 567.8), IsMissingNone, "TestOptDoubleByRefByVal(, 567.8)" + TestLog_ASSERT TestOptDoubleByRefByVal(, 567.8), IsMissingNone, "TestOptDoubleByRefByVal(, 567.8)" TestLog_ASSERT TestOptDoubleByRefByVal(123.4, 567.8), IsMissingNone, "TestOptDoubleByRefByVal(123.4, 567.8)" ' optionals with integer datatypes TestLog_ASSERT TestOptInteger(), IsMissingNone, "TestOptInteger()" TestLog_ASSERT TestOptInteger(123), IsMissingNone, "TestOptInteger(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptInteger(, 456), IsMissingNone, "TestOptInteger(, 456)" + TestLog_ASSERT TestOptInteger(, 456), IsMissingNone, "TestOptInteger(, 456)" TestLog_ASSERT TestOptInteger(123, 456), IsMissingNone, "TestOptInteger(123, 456)" ' optionals with integer datatypes (ByRef and ByVal) TestLog_ASSERT TestOptIntegerByRefByVal(), IsMissingNone, "TestOptIntegerByRefByVal()" TestLog_ASSERT TestOptIntegerByRefByVal(123), IsMissingNone, "TestOptIntegerByRefByVal(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptIntegerByRefByVal(, 456), IsMissingNone, "TestOptIntegerByRefByVal(, 456)" + TestLog_ASSERT TestOptIntegerByRefByVal(, 456), IsMissingNone, "TestOptIntegerByRefByVal(, 456)" TestLog_ASSERT TestOptIntegerByRefByVal(123, 456), IsMissingNone, "TestOptIntegerByRefByVal(123, 456)" ' optionals with string datatypes TestLog_ASSERT TestOptString(), IsMissingNone, "TestOptString()" TestLog_ASSERT TestOptString("123"), IsMissingNone, "TestOptString(""123"")" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptString(, "456"), IsMissingNone, "TestOptString(, ""456"")" + TestLog_ASSERT TestOptString(, "456"), IsMissingNone, "TestOptString(, ""456"")" TestLog_ASSERT TestOptString("123", "456"), IsMissingNone, "TestOptString(""123"", ""456"")" ' optionals with string datatypes (ByRef and ByVal) TestLog_ASSERT TestOptStringByRefByVal(), IsMissingNone, "TestOptStringByRefByVal()" TestLog_ASSERT TestOptStringByRefByVal("123"), IsMissingNone, "TestOptStringByRefByVal(""123"")" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptStringByRefByVal(, "456"), IsMissingNone, "TestOptStringByRefByVal(, ""456"")" + TestLog_ASSERT TestOptStringByRefByVal(, "456"), IsMissingNone, "TestOptStringByRefByVal(, ""456"")" TestLog_ASSERT TestOptStringByRefByVal("123", "456"), IsMissingNone, "TestOptStringByRefByVal(""123"", ""456"")" ' optionals with object datatypes @@ -97,15 +89,13 @@ Function verify_testIsMissingVba() As String cB.Add (567.8) TestLog_ASSERT TestOptObject(), IsMissingAB, "TestOptObject()" TestLog_ASSERT TestOptObject(cA), IsMissingB, "TestOptObject(A)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptObject(, cB), IsMissingA, "TestOptObject(, B)" + TestLog_ASSERT TestOptObject(, cB), IsMissingA, "TestOptObject(, B)" TestLog_ASSERT TestOptObject(cA, cB), IsMissingNone, "TestOptObject(A, B)" ' optionals with object datatypes (ByRef and ByVal) TestLog_ASSERT TestOptObjectByRefByVal(), IsMissingAB, "TestOptObjectByRefByVal()" TestLog_ASSERT TestOptObjectByRefByVal(cA), IsMissingB, "TestOptObjectByRefByVal(A)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptObjectByRefByVal(, cB), IsMissingA, "TestOptObjectByRefByVal(, B)" + TestLog_ASSERT TestOptObjectByRefByVal(, cB), IsMissingA, "TestOptObjectByRefByVal(, B)" TestLog_ASSERT TestOptObjectByRefByVal(cA, cB), IsMissingNone, "TestOptObjectByRefByVal(A, B)" ' optionals with array datatypes @@ -118,8 +108,6 @@ Function verify_testIsMissingVba() As String ' TODO - New bug report? Scanner initializes variable not as an array ' TestLog_ASSERT TestOptArray(), IsMissingAB, "TestOptArray()" ' TestLog_ASSERT TestOptArray(aA), IsMissingB, "TestOptArray(A)" - - ' TODO - tdf#125180 for more details ' TestLog_ASSERT TestOptArray(, aB), IsMissingA, "TestOptArray(, B)" TestLog_ASSERT TestOptArray(aA, aB), IsMissingNone, "TestOptArray(A, B)" @@ -127,8 +115,6 @@ Function verify_testIsMissingVba() As String ' TODO - New bug report? Scanner initializes variable not as an array ' TestLog_ASSERT TestOptArrayByRefByVal(), IsMissingAB, "TestOptArrayByRefByVal()" ' TestLog_ASSERT TestOptArrayByRefByVal(aA), IsMissingB, "TestOptArrayByRefByVal(A)" - - ' TODO - tdf#125180 for more details ' TestLog_ASSERT TestOptArrayByRefByVal(, aB), IsMissingA, "TestOptArrayByRefByVal(, B)" TestLog_ASSERT TestOptArrayByRefByVal(aA, aB), IsMissingNone, "TestOptArrayByRefByVal(A, B)" diff --git a/basic/qa/vba_tests/optional_paramters.vb b/basic/qa/vba_tests/optional_paramters.vb index eff8275d0e63..a8716c16c95e 100644 --- a/basic/qa/vba_tests/optional_paramters.vb +++ b/basic/qa/vba_tests/optional_paramters.vb @@ -24,65 +24,57 @@ Function verify_testOptionalsVba() As String failCount = 0 result = "Test Results" & Chr$(10) & "============" & Chr$(10) - testName = "Test optionals (Basic)" + testName = "Test optionals (VBA)" On Error GoTo errorHandler ' optionals with variant datatypes ' TODO - New bug report? Scanner initializes variable as String. Function returns "123" ' TestLog_ASSERT TestOptVariant(), 123, "TestOptVariant()" TestLog_ASSERT TestOptVariant(123), 246, "TestOptVariant(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptVariant(, 456), 456, "TestOptVariant(, 456)" + TestLog_ASSERT TestOptVariant(, 456), 456, "TestOptVariant(, 456)" TestLog_ASSERT TestOptVariant(123, 456), 579, "TestOptVariant(123, 456)" ' optionals with variant datatypes (ByRef and ByVal) ' TODO - New bug report? Scanner initializes variable as String. Function returns "123" ' TestLog_ASSERT TestOptVariantByRefByVal(), 123, "TestOptVariantByRefByVal()" TestLog_ASSERT TestOptVariantByRefByVal(123), 246, "TestOptVariantByRefByVal(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptVariantByRefByVal(, 456), 456, "TestOptVariantByRefByVal(, 456)" + TestLog_ASSERT TestOptVariantByRefByVal(, 456), 456, "TestOptVariantByRefByVal(, 456)" TestLog_ASSERT TestOptVariantByRefByVal(123, 456), 579, "TestOptVariantByRefByVal(123, 456)" ' optionals with double datatypes TestLog_ASSERT TestOptDouble(), 123.4, "TestOptDouble()" TestLog_ASSERT TestOptDouble(123.4), 246.8, "TestOptDouble(123.4)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptDouble(, 567.8), 567.8, "TestOptDouble(, 567.8)" + TestLog_ASSERT TestOptDouble(, 567.8), 567.8, "TestOptDouble(, 567.8)" TestLog_ASSERT Format(TestOptDouble(123.4, 567.8), "0.0"), 691.2, "TestOptDouble(123.4, 567.8)" ' optionals with double datatypes (ByRef and ByVal) TestLog_ASSERT TestOptDoubleByRefByVal(), 123.4, "TestOptDouble()" TestLog_ASSERT TestOptDoubleByRefByVal(123.4), 246.8, "TestOptDouble(123.4)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptDoubleByRefByVal(, 567.8), 567.8, "TestOptDoubleByRefByVal(, 567.8)" + TestLog_ASSERT TestOptDoubleByRefByVal(, 567.8), 567.8, "TestOptDoubleByRefByVal(, 567.8)" TestLog_ASSERT Format(TestOptDoubleByRefByVal(123.4, 567.8), "0.0"), 691.2, "TestOptDoubleByRefByVal(123.4, 567.8)" ' optionals with integer datatypes TestLog_ASSERT TestOptInteger(), 123, "TestOptInteger()" TestLog_ASSERT TestOptInteger(123), 246, "TestOptInteger(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptInteger(, 456), 456, "TestOptInteger(, 456)" + TestLog_ASSERT TestOptInteger(, 456), 456, "TestOptInteger(, 456)" TestLog_ASSERT TestOptInteger(123, 456), 579, "TestOptInteger(123, 456)" ' optionals with integer datatypes (ByRef and ByVal) TestLog_ASSERT TestOptIntegerByRefByVal(), 123, "TestOptIntegerByRefByVal()" TestLog_ASSERT TestOptIntegerByRefByVal(123), 246, "TestOptIntegerByRefByVal(123)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptIntegerByRefByVal(, 456), 456, "TestOptIntegerByRefByVal(, 456)" + TestLog_ASSERT TestOptIntegerByRefByVal(, 456), 456, "TestOptIntegerByRefByVal(, 456)" TestLog_ASSERT TestOptIntegerByRefByVal(123, 456), 579, "TestOptIntegerByRefByVal(123, 456)" ' optionals with string datatypes TestLog_ASSERT TestOptString(), "123", "TestOptString()" TestLog_ASSERT TestOptString("123"), "123123", "TestOptString(""123"")" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptString(, "456"), "456", "TestOptString(, ""456"")" + TestLog_ASSERT TestOptString(, "456"), "456", "TestOptString(, ""456"")" TestLog_ASSERT TestOptString("123", "456"), "123456", "TestOptString(""123"", ""456"")" ' optionals with string datatypes (ByRef and ByVal) TestLog_ASSERT TestOptStringByRefByVal(), "123", "TestOptStringByRefByVal()" TestLog_ASSERT TestOptStringByRefByVal("123"), "123123", "TestOptStringByRefByVal(""123"")" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT TestOptStringByRefByVal(, "456"), "456", "TestOptStringByRefByVal(, ""456"")" + TestLog_ASSERT TestOptStringByRefByVal(, "456"), "456", "TestOptStringByRefByVal(, ""456"")" TestLog_ASSERT TestOptStringByRefByVal("123", "456"), "123456", "TestOptStringByRefByVal(""123"", ""456"")" ' optionals with object datatypes @@ -94,15 +86,13 @@ Function verify_testOptionalsVba() As String cB.Add (567.8) TestLog_ASSERT TestOptObject(), 0, "TestOptObject()" TestLog_ASSERT TestOptObject(cA), 579, "TestOptObject(A)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT Format(TestOptObject(, cB), "0.0"), 691.2, "TestOptObject(, B)" + TestLog_ASSERT Format(TestOptObject(, cB), "0.0"), 691.2, "TestOptObject(, B)" TestLog_ASSERT Format(TestOptObject(cA, cB), "0.0"), 1270.2, "TestOptObject(A, B)" ' optionals with object datatypes (ByRef and ByVal) TestLog_ASSERT TestOptObjectByRefByVal(), 0, "TestOptObjectByRefByVal()" TestLog_ASSERT TestOptObjectByRefByVal(cA), 579, "TestOptObjectByRefByVal(A)" - ' TODO - tdf#125180 for more details - ' TestLog_ASSERT Format(TestOptObjectByRefByVal(, cB), "0.0"), 691.2, "TestOptObjectByRefByVal(, B)" + TestLog_ASSERT Format(TestOptObjectByRefByVal(, cB), "0.0"), 691.2, "TestOptObjectByRefByVal(, B)" TestLog_ASSERT Format(TestOptObjectByRefByVal(cA, cB), "0.0"), 1270.2, "TestOptObjectByRefByVal(A, B)" ' optionals with array datatypes @@ -115,8 +105,6 @@ Function verify_testOptionalsVba() As String ' TODO - New bug report? Scanner initializes variable not as an array ' TestLog_ASSERT TestOptArray(), 0, "TestOptArray()" ' TestLog_ASSERT TestOptArray(aA), 579, "TestOptArray(A)" - - ' TODO - tdf#125180 for more details ' TestLog_ASSERT Format(TestOptArray(, aB), "0.0"), 691.2, "TestOptArray(, B)" TestLog_ASSERT Format(TestOptArray(aA, aB), "0.0"), 1270.2, "TestOptArray(A, B)" @@ -124,8 +112,6 @@ Function verify_testOptionalsVba() As String ' TODO - New bug report? Scanner initializes variable not as an array ' TestLog_ASSERT TestOptArrayByRefByVal(), 0, "TestOptArrayByRefByVal()" ' TestLog_ASSERT TestOptArrayByRefByVal(aA), 579, "TestOptArrayByRefByVal(A)" - - ' TODO - tdf#125180 for more details ' TestLog_ASSERT Format(TestOptArrayByRefByVal(, aB), "0.0"), 691.2, "TestOptArrayByRefByVal(, B)" TestLog_ASSERT Format(TestOptArrayByRefByVal(aA, aB), "0.0"), 1270.2, "TestOptArrayByRefByVal(A, B)" |