[Libreoffice-commits] core.git: basic/qa

Zdeněk Crhonek zcrhonek at gmail.com
Thu Dec 21 23:04:23 UTC 2017


 basic/qa/cppunit/test_vba.cxx   |    8 ----
 basic/qa/vba_tests/log.vb       |    2 -
 basic/qa/vba_tests/mirr.vb      |   66 --------------------------------------
 basic/qa/vba_tests/monthname.vb |    2 -
 basic/qa/vba_tests/nper.vb      |   60 -----------------------------------
 basic/qa/vba_tests/npv.vb       |   65 --------------------------------------
 basic/qa/vba_tests/pmt.vb       |   68 ----------------------------------------
 basic/qa/vba_tests/ppmt.vb      |   68 ----------------------------------------
 basic/qa/vba_tests/pv.vb        |   68 ----------------------------------------
 basic/qa/vba_tests/qbcolor.vb   |    2 -
 basic/qa/vba_tests/rate.vb      |    2 -
 basic/qa/vba_tests/rgb.vb       |    2 -
 basic/qa/vba_tests/right.vb     |    4 --
 basic/qa/vba_tests/rtrim.vb     |    4 --
 basic/qa/vba_tests/second.vb    |    4 --
 basic/qa/vba_tests/sgn.vb       |   14 +++-----
 basic/qa/vba_tests/sin.vb       |    4 --
 basic/qa/vba_tests/sln.vb       |   62 ------------------------------------
 18 files changed, 15 insertions(+), 490 deletions(-)

New commits:
commit baaf6c12c8e9f785dc91e5d3db8b2f5072d4e3f5
Author: Zdeněk Crhonek <zcrhonek at gmail.com>
Date:   Sun Dec 3 13:32:44 2017 +0100

    VB tests (3)-don't pass whe all tests fail
    
    Change-Id: I7dd99a43a3d41c8ca31a070028a19bd032d06435
    Reviewed-on: https://gerrit.libreoffice.org/45739
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Zdenek Crhonek <zcrhonek at gmail.com>

diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx
index d153a1d62f82..a238337b8953 100644
--- a/basic/qa/cppunit/test_vba.cxx
+++ b/basic/qa/cppunit/test_vba.cxx
@@ -109,24 +109,16 @@ void VBATest::testMiscVBAFunctions()
         "ltrim.vb",
         "mid.vb",
         "minute.vb",
-        "mirr.vb",
         "month.vb",
         "monthname.vb",
         "oct.vb",
-        "nper.vb",
-        "npv.vb",
-        "pmt.vb",
-        "ppmt.vb",
-        "pv.vb",
         "qbcolor.vb",
-        "rate.vb",
         "rgb.vb",
         "rtrim.vb",
         "right.vb",
         "second.vb",
         "sgn.vb",
         "sin.vb",
-        "sln.vb",
         "space.vb",
         "sqr.vb",
         "str.vb",
diff --git a/basic/qa/vba_tests/log.vb b/basic/qa/vba_tests/log.vb
index 675798bc1a72..08656bdf59c1 100644
--- a/basic/qa/vba_tests/log.vb
+++ b/basic/qa/vba_tests/log.vb
@@ -6,7 +6,7 @@ Dim result As String
 
 Function doUnitTest() As String
 result = verify_testLog()
-If failCount <> 0 And passCount > 0 Then
+If failCount <> 0 or passCount = 0 Then
     doUnitTest = result
 Else
     doUnitTest = "OK"
diff --git a/basic/qa/vba_tests/mirr.vb b/basic/qa/vba_tests/mirr.vb
deleted file mode 100644
index ebf35ea3b0e8..000000000000
--- a/basic/qa/vba_tests/mirr.vb
+++ /dev/null
@@ -1,66 +0,0 @@
-Option VBASupport 1
-Option Explicit
-Dim passCount As Integer
-Dim failCount As Integer
-Dim result As String
-
-Function doUnitTest() As String
-result = verify_testMIRR()
-If failCount <> 0 And passCount > 0 Then
-    doUnitTest = result
-Else
-    doUnitTest = "OK"
-End If
-End Function
-
-
-
-Function verify_testMIRR() As String
-
-    passCount = 0
-    failCount = 0
-
-    result = "Test Results" & Chr$(10) & "============" & Chr$(10)
-
-    Dim testName As String
-    Dim date1, date2, LoanAPR, InvAPR, Fmt, RetRate, Msg
-    testName = "Test MIRR function"
-    On Error GoTo errorHandler
-
-    Static Values(5) As Double    ' Set up array.
-    LoanAPR = 0.1   ' Loan rate.
-    InvAPR = 0.12   ' Reinvestment rate.
-    Values(0) = -70000    ' Business start-up costs.
-    Values(1) = 22000: Values(2) = 25000
-    Values(3) = 28000: Values(4) = 31000
-    date2 = 0.148
-    date1 = MIRR(Values(), LoanAPR, InvAPR)
-    TestLog_ASSERT Round(date1, 3) = Round(date2, 3), "the return MIRR is: " & date1
-
-    result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10)
-    verify_testMIRR = result
-
-    Exit Function
-errorHandler:
-        TestLog_ASSERT (False), testName & ": hit error handler"
-End Function
-
-Sub TestLog_ASSERT(assertion As Boolean, Optional testId As String, Optional testComment As String)
-
-    If assertion = True Then
-        passCount = passCount + 1
-    Else
-        Dim testMsg As String
-        If Not IsMissing(testId) Then
-            testMsg = testMsg + " : " + testId
-        End If
-        If Not IsMissing(testComment) And Not (testComment = "") Then
-            testMsg = testMsg + " (" + testComment + ")"
-        End If
-
-        result = result & Chr$(10) & " Failed: " & testMsg
-        failCount = failCount + 1
-    End If
-
-End Sub
-
diff --git a/basic/qa/vba_tests/monthname.vb b/basic/qa/vba_tests/monthname.vb
index fe90f14dba01..627f9095b036 100644
--- a/basic/qa/vba_tests/monthname.vb
+++ b/basic/qa/vba_tests/monthname.vb
@@ -6,7 +6,7 @@ Dim result As String
 
 Function doUnitTest() As String
 result = verify_testMonthName()
-If failCount <> 0 And passCount > 0 Then
+If failCount <> 0 or passCount = 0 Then
     doUnitTest = result
 Else
     doUnitTest = "OK"
diff --git a/basic/qa/vba_tests/nper.vb b/basic/qa/vba_tests/nper.vb
deleted file mode 100644
index 2677a883c78c..000000000000
--- a/basic/qa/vba_tests/nper.vb
+++ /dev/null
@@ -1,60 +0,0 @@
-Option VBASupport 1
-Option Explicit
-Dim passCount As Integer
-Dim failCount As Integer
-Dim result As String
-
-Function doUnitTest() As String
-result = verify_testNPer
-If failCount <> 0 And passCount > 0 Then
-    doUnitTest = result
-Else
-    doUnitTest = "OK"
-End If
-End Function
-
-
-
-Function verify_testNPer() As String
-
-    passCount = 0
-    failCount = 0
-
-    result = "Test Results" & Chr$(10) & "============" & Chr$(10)
-
-    Dim testName As String
-    Dim date1, date2
-    testName = "Test NPER function"
-    On Error GoTo errorHandler
-
-    date2 = -4.359
-    date1 = NPer(0.0821, 400, 2000)
-    TestLog_ASSERT Round(date1, 3) = Round(date2, 3), "the return NPer is: " & date1
-
-    result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10)
-    verify_testNPer = result
-
-    Exit Function
-errorHandler:
-        TestLog_ASSERT (False), testName & ": hit error handler"
-End Function
-
-Sub TestLog_ASSERT(assertion As Boolean, Optional testId As String, Optional testComment As String)
-
-    If assertion = True Then
-        passCount = passCount + 1
-    Else
-        Dim testMsg As String
-        If Not IsMissing(testId) Then
-            testMsg = testMsg + " : " + testId
-        End If
-        If Not IsMissing(testComment) And Not (testComment = "") Then
-            testMsg = testMsg + " (" + testComment + ")"
-        End If
-
-        result = result & Chr$(10) & " Failed: " & testMsg
-        failCount = failCount + 1
-    End If
-
-End Sub
-
diff --git a/basic/qa/vba_tests/npv.vb b/basic/qa/vba_tests/npv.vb
deleted file mode 100644
index cc6262a81189..000000000000
--- a/basic/qa/vba_tests/npv.vb
+++ /dev/null
@@ -1,65 +0,0 @@
-Option VBASupport 1
-Option Explicit
-Dim passCount As Integer
-Dim failCount As Integer
-Dim result As String
-
-Function doUnitTest() As String
-result = verify_testNPV()
-If failCount <> 0 And passCount > 0 Then
-    doUnitTest = result
-Else
-    doUnitTest = "OK"
-End If
-End Function
-
-
-
-Function verify_testNPV() As String
-
-    passCount = 0
-    failCount = 0
-
-    result = "Test Results" & Chr$(10) & "============" & Chr$(10)
-
-    Dim testName As String
-    Dim date1, date2
-    testName = "Test NPV function"
-    On Error GoTo errorHandler
-    Static Values(5) As Double    ' Set up array.
-    Values(0) = -70000    ' Business start-up costs.
-    ' Positive cash flows reflecting income for four successive years.
-    Values(1) = 22000: Values(2) = 25000
-    Values(3) = 28000: Values(4) = 31000
-
-    date2 = 19312.57
-    date1 = NPV(0.0625, Values())     ' Calculate net present value.
-    TestLog_ASSERT Round(date1, 2) = Round(date2, 2), "the return NPV is: " & date1
-
-    result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10)
-    verify_testNPV = result
-
-    Exit Function
-errorHandler:
-        TestLog_ASSERT (False), testName & ": hit error handler"
-End Function
-
-Sub TestLog_ASSERT(assertion As Boolean, Optional testId As String, Optional testComment As String)
-
-    If assertion = True Then
-        passCount = passCount + 1
-    Else
-        Dim testMsg As String
-        If Not IsMissing(testId) Then
-            testMsg = testMsg + " : " + testId
-        End If
-        If Not IsMissing(testComment) And Not (testComment = "") Then
-            testMsg = testMsg + " (" + testComment + ")"
-        End If
-
-        result = result & Chr$(10) & " Failed: " & testMsg
-        failCount = failCount + 1
-    End If
-
-End Sub
-
diff --git a/basic/qa/vba_tests/pmt.vb b/basic/qa/vba_tests/pmt.vb
deleted file mode 100644
index 937f7e6f1b58..000000000000
--- a/basic/qa/vba_tests/pmt.vb
+++ /dev/null
@@ -1,68 +0,0 @@
-Option VBASupport 1
-Option Explicit
-Dim passCount As Integer
-Dim failCount As Integer
-Dim result As String
-
-Function doUnitTest() As String
-result = verify_testPMT()
-If failCount <> 0 And passCount > 0 Then
-    doUnitTest = result
-Else
-    doUnitTest = "OK"
-End If
-End Function
-
-
-
-Function verify_testPMT() As String
-
-    passCount = 0
-    failCount = 0
-
-    result = "Test Results" & Chr$(10) & "============" & Chr$(10)
-
-    Dim testName As String
-    Dim date1, date2
-    testName = "Test PMT function"
-    On Error GoTo errorHandler
-
-    date2 = -255.14
-    date1 = Pmt(0.0083, 48, 10000, 100, 0)
-    TestLog_ASSERT Round(date1, 2) = Round(date2, 2), "the return PMT is: " & date1
-
-    date2 = -253.04
-    date1 = Pmt(0.0083, 48, 10000, 100, 1)
-    TestLog_ASSERT Round(date1, 2) = Round(date2, 2), "the return PMT is: " & date1
-
-    date2 = -253.43
-    date1 = Pmt(0.0083, 48, 10000)
-    TestLog_ASSERT Round(date1, 2) = Round(date2, 2), "the return PMT is: " & date1
-
-    result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10)
-    verify_testPMT = result
-
-    Exit Function
-errorHandler:
-        TestLog_ASSERT (False), testName & ": hit error handler"
-End Function
-
-Sub TestLog_ASSERT(assertion As Boolean, Optional testId As String, Optional testComment As String)
-
-    If assertion = True Then
-        passCount = passCount + 1
-    Else
-        Dim testMsg As String
-        If Not IsMissing(testId) Then
-            testMsg = testMsg + " : " + testId
-        End If
-        If Not IsMissing(testComment) And Not (testComment = "") Then
-            testMsg = testMsg + " (" + testComment + ")"
-        End If
-
-        result = result & Chr$(10) & " Failed: " & testMsg
-        failCount = failCount + 1
-    End If
-
-End Sub
-
diff --git a/basic/qa/vba_tests/ppmt.vb b/basic/qa/vba_tests/ppmt.vb
deleted file mode 100644
index 47a67b120de4..000000000000
--- a/basic/qa/vba_tests/ppmt.vb
+++ /dev/null
@@ -1,68 +0,0 @@
-Option VBASupport 1
-Option Explicit
-Dim passCount As Integer
-Dim failCount As Integer
-Dim result As String
-
-Function doUnitTest() As String
-result = verify_testPPMT()
-If failCount <> 0 And passCount > 0 Then
-    doUnitTest = result
-Else
-    doUnitTest = "OK"
-End If
-End Function
-
-
-
-Function verify_testPPMT() As String
-
-    passCount = 0
-    failCount = 0
-
-    result = "Test Results" & Chr$(10) & "============" & Chr$(10)
-
-    Dim testName As String
-    Dim date1, date2
-    testName = "Test PPMT function"
-    On Error GoTo errorHandler
-
-    date2 = -188.52
-    date1 = PPmt(0.0083, 12, 48, 10000, 100, 0)
-    TestLog_ASSERT Round(date1, 2) = Round(date2, 2), "the return PPMT is: " & date1
-
-    date2 = -186.97
-    date1 = PPmt(0.0083, 12, 48, 10000, 100, 1)
-    TestLog_ASSERT Round(date1, 2) = Round(date2, 2), "the return PPMT is: " & date1
-
-    date2 = -186.66
-    date1 = PPmt(0.0083, 12, 48, 10000)
-    TestLog_ASSERT Round(date1, 2) = Round(date2, 2), "the return PPMT is: " & date1
-
-    result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10)
-    verify_testPPMT = result
-
-    Exit Function
-errorHandler:
-        TestLog_ASSERT (False), testName & ": hit error handler"
-End Function
-
-Sub TestLog_ASSERT(assertion As Boolean, Optional testId As String, Optional testComment As String)
-
-    If assertion = True Then
-        passCount = passCount + 1
-    Else
-        Dim testMsg As String
-        If Not IsMissing(testId) Then
-            testMsg = testMsg + " : " + testId
-        End If
-        If Not IsMissing(testComment) And Not (testComment = "") Then
-            testMsg = testMsg + " (" + testComment + ")"
-        End If
-
-        result = result & Chr$(10) & " Failed: " & testMsg
-        failCount = failCount + 1
-    End If
-
-End Sub
-
diff --git a/basic/qa/vba_tests/pv.vb b/basic/qa/vba_tests/pv.vb
deleted file mode 100644
index d63d6f355b78..000000000000
--- a/basic/qa/vba_tests/pv.vb
+++ /dev/null
@@ -1,68 +0,0 @@
-Option VBASupport 1
-Option Explicit
-Dim passCount As Integer
-Dim failCount As Integer
-Dim result As String
-
-Function doUnitTest() As String
-result = verify_testPV()
-If failCount <> 0 And passCount > 0 Then
-    doUnitTest = result
-Else
-    doUnitTest = "OK"
-End If
-End Function
-
-
-
-Function verify_testPV() As String
-
-    passCount = 0
-    failCount = 0
-
-    result = "Test Results" & Chr$(10) & "============" & Chr$(10)
-
-    Dim testName As String
-    Dim date1, date2
-    testName = "Test PV function"
-    On Error GoTo errorHandler
-
-    date2 = -394647.64
-    date1 = PV(0.0083, 48, 10000, 100, 0)
-    TestLog_ASSERT Round(date1, 2) = Round(date2, 2), "the return PV is: " & date1
-
-    date2 = -397922.66
-    date1 = PV(0.0083, 48, 10000, 100, 1)
-    TestLog_ASSERT Round(date1, 2) = Round(date2, 2), "the return PV is: " & date1
-
-    date2 = -394580.39
-    date1 = PV(0.0083, 48, 10000)
-    TestLog_ASSERT Round(date1, 2) = Round(date2, 2), "the return PV is: " & date1
-
-    result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10)
-    verify_testPV = result
-
-    Exit Function
-errorHandler:
-        TestLog_ASSERT (False), testName & ": hit error handler"
-End Function
-
-Sub TestLog_ASSERT(assertion As Boolean, Optional testId As String, Optional testComment As String)
-
-    If assertion = True Then
-        passCount = passCount + 1
-    Else
-        Dim testMsg As String
-        If Not IsMissing(testId) Then
-            testMsg = testMsg + " : " + testId
-        End If
-        If Not IsMissing(testComment) And Not (testComment = "") Then
-            testMsg = testMsg + " (" + testComment + ")"
-        End If
-
-        result = result & Chr$(10) & " Failed: " & testMsg
-        failCount = failCount + 1
-    End If
-
-End Sub
-
diff --git a/basic/qa/vba_tests/qbcolor.vb b/basic/qa/vba_tests/qbcolor.vb
index c0a1a1813156..d9f617219b26 100644
--- a/basic/qa/vba_tests/qbcolor.vb
+++ b/basic/qa/vba_tests/qbcolor.vb
@@ -6,7 +6,7 @@ Dim result As String
 
 Function doUnitTest() As String
 result = verify_testQBcolor()
-If failCount <> 0 And passCount > 0 Then
+If failCount <> 0 or passCount = 0 Then
     doUnitTest = result
 Else
     doUnitTest = "OK"
diff --git a/basic/qa/vba_tests/rate.vb b/basic/qa/vba_tests/rate.vb
index 184dd2a5a038..898705911b32 100644
--- a/basic/qa/vba_tests/rate.vb
+++ b/basic/qa/vba_tests/rate.vb
@@ -7,7 +7,7 @@ Dim result As String
 
 Function doUnitTest() As String
 result = verify_testRATE()
-If failCount <> 0 And passCount > 0 Then
+If failCount <> 0 or passCount = 0 Then
     doUnitTest = result
 Else
     doUnitTest = "OK"
diff --git a/basic/qa/vba_tests/rgb.vb b/basic/qa/vba_tests/rgb.vb
index cd435df3883e..b36f3e099c9f 100644
--- a/basic/qa/vba_tests/rgb.vb
+++ b/basic/qa/vba_tests/rgb.vb
@@ -7,7 +7,7 @@ Dim result As String
 
 Function doUnitTest() As String
 result = verify_testRGB()
-If failCount <> 0 And passCount > 0 Then
+If failCount <> 0 or passCount = 0 Then
     doUnitTest = result
 Else
     doUnitTest = "OK"
diff --git a/basic/qa/vba_tests/right.vb b/basic/qa/vba_tests/right.vb
index d67523cd9358..0e09bc11cca3 100644
--- a/basic/qa/vba_tests/right.vb
+++ b/basic/qa/vba_tests/right.vb
@@ -6,7 +6,7 @@ Dim result As String
 
 Function doUnitTest() As String
 result = verify_testRight()
-If failCount <> 0 And passCount > 0 Then
+If failCount <> 0 or passCount = 0 Then
     doUnitTest = result
 Else
     doUnitTest = "OK"
@@ -23,8 +23,6 @@ Function verify_testRight() As String
     result = "Test Results" & Chr$(10) & "============" & Chr$(10)
 
     Dim testName As String
-    Dim TestDateTime As Date
-    Dim TestStr As String
     Dim date1, date2
     testName = "Test Right function"
     On Error GoTo errorHandler
diff --git a/basic/qa/vba_tests/rtrim.vb b/basic/qa/vba_tests/rtrim.vb
index 0de1aea71b06..d99cfd85f2d1 100644
--- a/basic/qa/vba_tests/rtrim.vb
+++ b/basic/qa/vba_tests/rtrim.vb
@@ -6,7 +6,7 @@ Dim result As String
 
 Function doUnitTest() As String
 result = verify_testRTrim()
-If failCount <> 0 And passCount > 0 Then
+If failCount <> 0 or passCount = 0 Then
     doUnitTest = result
 Else
     doUnitTest = "OK"
@@ -23,8 +23,6 @@ Function verify_testRTrim() As String
     result = "Test Results" & Chr$(10) & "============" & Chr$(10)
 
     Dim testName As String
-    Dim TestDateTime As Date
-    Dim TestStr As String
     Dim date1, date2
     testName = "Test RTrim function"
     On Error GoTo errorHandler
diff --git a/basic/qa/vba_tests/second.vb b/basic/qa/vba_tests/second.vb
index 40e93ad1a6c3..4d84b4f737a6 100644
--- a/basic/qa/vba_tests/second.vb
+++ b/basic/qa/vba_tests/second.vb
@@ -6,7 +6,7 @@ Dim result As String
 
 Function doUnitTest() As String
 result = verify_testSecond()
-If failCount <> 0 And passCount > 0 Then
+If failCount <> 0 or passCount = 0 Then
     doUnitTest = result
 Else
     doUnitTest = "OK"
@@ -23,8 +23,6 @@ Function verify_testSecond() As String
     result = "Test Results" & Chr$(10) & "============" & Chr$(10)
 
     Dim testName As String
-    Dim TestDateTime As Date
-    Dim TestStr As String
     Dim date1, date2
     testName = "Test Second function"
     On Error GoTo errorHandler
diff --git a/basic/qa/vba_tests/sgn.vb b/basic/qa/vba_tests/sgn.vb
index c723e4153331..e72215679e6d 100644
--- a/basic/qa/vba_tests/sgn.vb
+++ b/basic/qa/vba_tests/sgn.vb
@@ -6,7 +6,7 @@ Dim result As String
 
 Function doUnitTest() As String
 result = verify_SGN()
-If failCount <> 0 And passCount > 0 Then
+If failCount <> 0 or passCount = 0 Then
     doUnitTest = result
 Else
     doUnitTest = "OK"
@@ -23,30 +23,28 @@ Function verify_SGN() As String
     result = "Test Results" & Chr$(10) & "============" & Chr$(10)
 
     Dim testName As String
-    Dim TestDateTime As Date
-    Dim TestStr As String
     Dim date1, date2
     testName = "Test SGN function"
     On Error GoTo errorHandler
 
     date2 = 0
-    date1 = DateValue(0)
+    date1 = sgn(0)
     TestLog_ASSERT date1 = date2, "the return SGN is: " & date1
 
     date2 = -1
-    date1 = DateValue(-1)
+    date1 = sgn(-1)
     TestLog_ASSERT date1 = date2, "the return SGN is: " & date1
 
     date2 = 1
-    date1 = DateValue(1)
+    date1 = sgn(1)
     TestLog_ASSERT date1 = date2, "the return SGN is: " & date1
 
     date2 = 1
-    date1 = DateValue(50)
+    date1 = sgn(50)
     TestLog_ASSERT date1 = date2, "the return SGN is: " & date1
 
     date2 = -1
-    date1 = DateValue(-50)
+    date1 = sgn(-50)
     TestLog_ASSERT date1 = date2, "the return SGN is: " & date1
 
     result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10)
diff --git a/basic/qa/vba_tests/sin.vb b/basic/qa/vba_tests/sin.vb
index a8f7c548343e..af2e73bd98c2 100644
--- a/basic/qa/vba_tests/sin.vb
+++ b/basic/qa/vba_tests/sin.vb
@@ -6,7 +6,7 @@ Dim result As String
 
 Function doUnitTest() As String
 result = verify_testSIN()
-If failCount <> 0 And passCount > 0 Then
+If failCount <> 0 or passCount = 0 Then
     doUnitTest = result
 Else
     doUnitTest = "OK"
@@ -23,8 +23,6 @@ Function verify_testSIN() As String
     result = "Test Results" & Chr$(10) & "============" & Chr$(10)
 
     Dim testName As String
-    Dim TestDateTime As Date
-    Dim TestStr As String
     Dim date1, date2
     testName = "Test SIN function"
     On Error GoTo errorHandler
diff --git a/basic/qa/vba_tests/sln.vb b/basic/qa/vba_tests/sln.vb
deleted file mode 100644
index fcd4ad416d0f..000000000000
--- a/basic/qa/vba_tests/sln.vb
+++ /dev/null
@@ -1,62 +0,0 @@
-Option VBASupport 1
-Option Explicit
-Dim passCount As Integer
-Dim failCount As Integer
-Dim result As String
-
-Function doUnitTest() As String
-result = verify_testSLN()
-If failCount <> 0 And passCount > 0 Then
-    doUnitTest = result
-Else
-    doUnitTest = "OK"
-End If
-End Function
-
-
-
-Function verify_testSLN() As String
-
-    passCount = 0
-    failCount = 0
-
-    result = "Test Results" & Chr$(10) & "============" & Chr$(10)
-
-    Dim testName As String
-    Dim TestDateTime As Date
-    Dim TestStr As String
-    Dim date1, date2
-    testName = "Test SLN function"
-    On Error GoTo errorHandler
-
-    date2 = 395.83
-    date1 = SLN(10000, 500, 24)
-    TestLog_ASSERT Round(date1, 2) = Round(date2, 2), "the return SLN is: " & date1
-
-    result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10)
-    verify_testSLN = result
-
-    Exit Function
-errorHandler:
-        TestLog_ASSERT (False), testName & ": hit error handler"
-End Function
-
-Sub TestLog_ASSERT(assertion As Boolean, Optional testId As String, Optional testComment As String)
-
-    If assertion = True Then
-        passCount = passCount + 1
-    Else
-        Dim testMsg As String
-        If Not IsMissing(testId) Then
-            testMsg = testMsg + " : " + testId
-        End If
-        If Not IsMissing(testComment) And Not (testComment = "") Then
-            testMsg = testMsg + " (" + testComment + ")"
-        End If
-
-        result = result & Chr$(10) & " Failed: " & testMsg
-        failCount = failCount + 1
-    End If
-
-End Sub
-


More information about the Libreoffice-commits mailing list