summaryrefslogtreecommitdiff
path: root/basic/qa
diff options
context:
space:
mode:
authorZdeněk Crhonek <zcrhonek@gmail.com>2017-12-02 15:55:07 +0100
committerZdenek Crhonek <zcrhonek@gmail.com>2017-12-02 22:47:50 +0100
commit2bfbe3492d443c31c83b830df3f95fad76a58d67 (patch)
treeb73a3d5070b68e7df6810f1128eac5be22e9050b /basic/qa
parentbd7776f96358b4e868f4f64b793a63c5d5d82499 (diff)
VBA tests repair (2) - don't pass the test when all tests fail
Change-Id: I2519fc54e2ce74ec3c6777aa002971548a21c3c6 Reviewed-on: https://gerrit.libreoffice.org/45715 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
Diffstat (limited to 'basic/qa')
-rw-r--r--basic/qa/vba_tests/datepart.vb20
-rw-r--r--basic/qa/vba_tests/day.vb4
-rw-r--r--basic/qa/vba_tests/exp.vb2
-rw-r--r--basic/qa/vba_tests/instrrev.vb2
4 files changed, 14 insertions, 14 deletions
diff --git a/basic/qa/vba_tests/datepart.vb b/basic/qa/vba_tests/datepart.vb
index b07a04d97260..5b9ab2b7f4a8 100644
--- a/basic/qa/vba_tests/datepart.vb
+++ b/basic/qa/vba_tests/datepart.vb
@@ -6,7 +6,7 @@ Dim result As String
Function doUnitTest() As String
result = verify_testDatePart()
-If failCount <> 0 And passCount > 0 Then
+If failCount <> 0 or passCount = 0 Then
doUnitTest = result
Else
doUnitTest = "OK"
@@ -29,39 +29,39 @@ Function verify_testDatePart() As String
On Error GoTo errorHandler
date2 = 1969
- date1 = DatePart("yyyy", "12.2.1969")
+ date1 = DatePart("yyyy", "1969-02-12")
TestLog_ASSERT date1 = date2, "the return DatePart is: " & date1
date2 = 1
- date1 = DatePart("q", "12.2.1969")
+ date1 = DatePart("q", "1969-02-12")
TestLog_ASSERT date1 = date2, "the return DatePart is: " & date1
date2 = 43
- date1 = DatePart("y", "12.2.1969")
+ date1 = DatePart("y", "1969-02-12")
TestLog_ASSERT date1 = date2, "the return DatePart is: " & date1
date2 = 12
- date1 = DatePart("d", "12.2.1969")
+ date1 = DatePart("d", "1969-02-12")
TestLog_ASSERT date1 = date2, "the return DatePart is: " & date1
date2 = 4
- date1 = DatePart("w", "12.2.1969")
+ date1 = DatePart("w", "1969-02-12")
TestLog_ASSERT date1 = date2, "the return DatePart is: " & date1
date2 = 7
- date1 = DatePart("ww", "12.2.1969")
+ date1 = DatePart("ww", "1969-02-12")
TestLog_ASSERT date1 = date2, "the return DatePart is: " & date1
date2 = 16
- date1 = DatePart("h", "12.2.1969 16:32:00")
+ date1 = DatePart("h", "1969-02-12 16:32:00")
TestLog_ASSERT date1 = date2, "the return DatePart is: " & date1
date2 = 32
- date1 = DatePart("n", "12.2.1969 16:32:00")
+ date1 = DatePart("n", "1969-02-12 16:32:00")
TestLog_ASSERT date1 = date2, "the return DatePart is: " & date1
date2 = 0
- date1 = DatePart("s", "12.2.1969 16:32:00")
+ date1 = DatePart("s", "1969-02-12 16:32:00")
TestLog_ASSERT date1 = date2, "the return DatePart is: " & date1
diff --git a/basic/qa/vba_tests/day.vb b/basic/qa/vba_tests/day.vb
index 1bb4fbef9dcf..e33a7b84659b 100644
--- a/basic/qa/vba_tests/day.vb
+++ b/basic/qa/vba_tests/day.vb
@@ -6,7 +6,7 @@ Dim result As String
Function doUnitTest() As String
result = verify_testday()
-If failCount <> 0 And passCount > 0 Then
+If failCount <> 0 or passCount = 0 Then
doUnitTest = result
Else
doUnitTest = "OK"
@@ -28,7 +28,7 @@ Function verify_testday() As String
On Error GoTo errorHandler
date2 = 12
- date1 = Day("12.2.1969") '2/12/1969
+ date1 = Day("1969-02-12") '2/12/1969
TestLog_ASSERT date1 = date2, "the return day is: " & date1
result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10)
diff --git a/basic/qa/vba_tests/exp.vb b/basic/qa/vba_tests/exp.vb
index e6f5a5a06616..669f0d6b02c5 100644
--- a/basic/qa/vba_tests/exp.vb
+++ b/basic/qa/vba_tests/exp.vb
@@ -6,7 +6,7 @@ Dim result As String
Function doUnitTest() As String
result = verify_testExp()
-If failCount <> 0 And passCount > 0 Then
+If failCount <> 0 or passCount = 0 Then
doUnitTest = result
Else
doUnitTest = "OK"
diff --git a/basic/qa/vba_tests/instrrev.vb b/basic/qa/vba_tests/instrrev.vb
index dfbed9ad239b..7fe02cd60617 100644
--- a/basic/qa/vba_tests/instrrev.vb
+++ b/basic/qa/vba_tests/instrrev.vb
@@ -6,7 +6,7 @@ Dim result As String
Function doUnitTest() As String
result = verify_testInStrRev()
-If failCount <> 0 And passCount > 0 Then
+If failCount <> 0 or passCount = 0 Then
doUnitTest = result
Else
doUnitTest = "OK"