[Libreoffice-commits] core.git: basic/qa
Takeshi Abe
tabe at fixedpoint.jp
Wed May 17 08:31:09 UTC 2017
basic/qa/vba_tests/lcase.vb | 30 ++++++++++++++----------------
1 file changed, 14 insertions(+), 16 deletions(-)
New commits:
commit 6c2a10e1d087feda458dbaa1a5b398e569e70376
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Tue May 16 22:13:08 2017 +0900
basic: Fix broken test for VBA's LCase
Change-Id: Icdbe62d4faa04b59a5cc11ea8f72f5e88f664a6d
Reviewed-on: https://gerrit.libreoffice.org/37682
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
diff --git a/basic/qa/vba_tests/lcase.vb b/basic/qa/vba_tests/lcase.vb
index 17b2754a2799..d0916341d64d 100644
--- a/basic/qa/vba_tests/lcase.vb
+++ b/basic/qa/vba_tests/lcase.vb
@@ -6,7 +6,7 @@ Dim result As String
Function doUnitTest() As String
result = verify_testLCase()
-If failCount <> 0 And passCount > 0 Then
+If failCount <> 0 Or passCount = 0 Then
doUnitTest = result
Else
doUnitTest = "OK"
@@ -23,27 +23,25 @@ Function verify_testLCase() As String
result = "Test Results" & Chr$(10) & "============" & Chr$(10)
Dim testName As String
- Dim TestDateTime As Date
- Dim TestStr As String
- Dim date1, date2 As Date 'variables for test
+ Dim str1, str2 As String 'variables for test
testName = "Test LCase function"
On Error GoTo errorHandler
- date2 = "lowercase"
- date1 = LCase("LOWERCASE")
- TestLog_ASSERT date1 = date2, "the return LCase is: " & date1
+ str2 = "lowercase"
+ str1 = LCase("LOWERCASE")
+ TestLog_ASSERT str1 = str2, "the return LCase is: " & str1
- date2 = "lowercase"
- date1 = LCase("LowerCase")
- TestLog_ASSERT date1 = date2, "the return LCase is: " & date1
+ str2 = "lowercase"
+ str1 = LCase("LowerCase")
+ TestLog_ASSERT str1 = str2, "the return LCase is: " & str1
- date2 = "lowercase"
- date1 = LCase("lowercase")
- TestLog_ASSERT date1 = date2, "the return LCase is: " & date1
+ str2 = "lowercase"
+ str1 = LCase("lowercase")
+ TestLog_ASSERT str1 = str2, "the return LCase is: " & str1
- date2 = "lowercase"
- date1 = LCase("LOWER CASE")
- TestLog_ASSERT date1 = date2, "the return LCase is: " & date1
+ str2 = "lower case"
+ str1 = LCase("LOWER CASE")
+ TestLog_ASSERT str1 = str2, "the return LCase is: " & str1
result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10)
More information about the Libreoffice-commits
mailing list