summaryrefslogtreecommitdiff
path: root/basic/qa
diff options
context:
space:
mode:
Diffstat (limited to 'basic/qa')
-rw-r--r--basic/qa/vba_tests/join.vb32
1 files changed, 15 insertions, 17 deletions
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