[Libreoffice-commits] core.git: basic/qa
Takeshi Abe
tabe at fixedpoint.jp
Thu May 18 10:14:18 UTC 2017
basic/qa/vba_tests/join.vb | 32 +++++++++++++++-----------------
1 file changed, 15 insertions(+), 17 deletions(-)
New commits:
commit 9fb691adb459bf027aa71ef4bb1b7df0d987c099
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Wed May 17 22:13:39 2017 +0900
basic: Fix broken unit test for Join()
Change-Id: Ib9768097d73fe664e24da4c3989141e87342a34e
Reviewed-on: https://gerrit.libreoffice.org/37711
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Takeshi Abe <tabe at fixedpoint.jp>
diff --git a/basic/qa/vba_tests/join.vb b/basic/qa/vba_tests/join.vb
index 5b56c1b12162..e09cf8ac8dfa 100644
--- a/basic/qa/vba_tests/join.vb
+++ b/basic/qa/vba_tests/join.vb
@@ -6,7 +6,7 @@ Dim result As String
Function doUnitTest() As String
result = verify_testJoin()
-If failCount <> 0 And passCount > 0 Then
+If failCount <> 0 Or passCount = 0 Then
doUnitTest = result
Else
doUnitTest = "OK"
@@ -23,31 +23,29 @@ Function verify_testJoin() As String
result = "Test Results" & Chr$(10) & "============" & Chr$(10)
Dim testName As String
- Dim TestDateTime As Date
- Dim TestStr As String
- Dim date1, date2
- Dim vaArray() As String
+ Dim str1, str2 As String
+ Dim vaArray(2) As String
testName = "Test Join function"
On Error GoTo errorHandler
vaArray(0) = "string1"
vaArray(1) = "string2"
vaArray(2) = "string3"
- date2 = "string1 string2 string3"
- date1 = Join(vaArray)
- TestLog_ASSERT date1 = date2, "the return Join is: " & date1
+ str2 = "string1 string2 string3"
+ str1 = Join(vaArray)
+ TestLog_ASSERT str1 = str2, "the return Join is: " & str1
- date2 = "string1 string2 string3"
- date1 = Join(vaArray, " ")
- TestLog_ASSERT date1 = date2, "the return Join is: " & date1
+ str2 = "string1 string2 string3"
+ str1 = Join(vaArray, " ")
+ TestLog_ASSERT str1 = str2, "the return Join is: " & str1
- date2 = "string1<>string2<>string3"
- date1 = Join(vaArray, "<>")
- TestLog_ASSERT date1 = date2, "the return Join is: " & date1
+ str2 = "string1<>string2<>string3"
+ str1 = Join(vaArray, "<>")
+ TestLog_ASSERT str1 = str2, "the return Join is: " & str1
- date2 = "string1string2string3"
- date1 = Join(vaArray, "")
- TestLog_ASSERT date1 = date2, "the return Join is: " & date1
+ str2 = "string1string2string3"
+ str1 = Join(vaArray, "")
+ TestLog_ASSERT str1 = str2, "the return Join is: " & str1
result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10)
verify_testJoin = result
More information about the Libreoffice-commits
mailing list