summaryrefslogtreecommitdiff
path: root/basic/qa/vba_tests
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2017-05-16 22:13:08 +0900
committerJulien Nabet <serval2412@yahoo.fr>2017-05-17 10:30:19 +0200
commit6c2a10e1d087feda458dbaa1a5b398e569e70376 (patch)
tree7f128e96e47397e60f9c358f99e7b24e83bcab2a /basic/qa/vba_tests
parent4ecfc231b858e370cf62f7c5a0d5fb3073d25a9f (diff)
basic: Fix broken test for VBA's LCase
Change-Id: Icdbe62d4faa04b59a5cc11ea8f72f5e88f664a6d Reviewed-on: https://gerrit.libreoffice.org/37682 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'basic/qa/vba_tests')
-rw-r--r--basic/qa/vba_tests/lcase.vb30
1 files changed, 14 insertions, 16 deletions
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)