Kaydet (Commit) 6c2a10e1 authored tarafından Takeshi Abe's avatar Takeshi Abe Kaydeden (comit) Julien Nabet

basic: Fix broken test for VBA's LCase

Change-Id: Icdbe62d4faa04b59a5cc11ea8f72f5e88f664a6d
Reviewed-on: https://gerrit.libreoffice.org/37682Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
üst 4ecfc231
...@@ -6,7 +6,7 @@ Dim result As String ...@@ -6,7 +6,7 @@ Dim result As String
Function doUnitTest() As String Function doUnitTest() As String
result = verify_testLCase() result = verify_testLCase()
If failCount <> 0 And passCount > 0 Then If failCount <> 0 Or passCount = 0 Then
doUnitTest = result doUnitTest = result
Else Else
doUnitTest = "OK" doUnitTest = "OK"
...@@ -23,27 +23,25 @@ Function verify_testLCase() As String ...@@ -23,27 +23,25 @@ Function verify_testLCase() As String
result = "Test Results" & Chr$(10) & "============" & Chr$(10) result = "Test Results" & Chr$(10) & "============" & Chr$(10)
Dim testName As String Dim testName As String
Dim TestDateTime As Date Dim str1, str2 As String 'variables for test
Dim TestStr As String
Dim date1, date2 As Date 'variables for test
testName = "Test LCase function" testName = "Test LCase function"
On Error GoTo errorHandler On Error GoTo errorHandler
date2 = "lowercase" str2 = "lowercase"
date1 = LCase("LOWERCASE") str1 = LCase("LOWERCASE")
TestLog_ASSERT date1 = date2, "the return LCase is: " & date1 TestLog_ASSERT str1 = str2, "the return LCase is: " & str1
date2 = "lowercase" str2 = "lowercase"
date1 = LCase("LowerCase") str1 = LCase("LowerCase")
TestLog_ASSERT date1 = date2, "the return LCase is: " & date1 TestLog_ASSERT str1 = str2, "the return LCase is: " & str1
date2 = "lowercase" str2 = "lowercase"
date1 = LCase("lowercase") str1 = LCase("lowercase")
TestLog_ASSERT date1 = date2, "the return LCase is: " & date1 TestLog_ASSERT str1 = str2, "the return LCase is: " & str1
date2 = "lowercase" str2 = "lower case"
date1 = LCase("LOWER CASE") str1 = LCase("LOWER CASE")
TestLog_ASSERT date1 = date2, "the return LCase is: " & date1 TestLog_ASSERT str1 = str2, "the return LCase is: " & str1
result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10) result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment