diff options
Diffstat (limited to 'basic/qa')
-rw-r--r-- | basic/qa/vba_tests/datepart.vb | 20 | ||||
-rw-r--r-- | basic/qa/vba_tests/day.vb | 4 | ||||
-rw-r--r-- | basic/qa/vba_tests/exp.vb | 2 | ||||
-rw-r--r-- | basic/qa/vba_tests/instrrev.vb | 2 |
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" |